nBill Community nBill Home Page
22/May/2012, 11:00:43 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Click Here for the nBill home page, or take a tour.  
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: 2 times callback from payment gateway  (Read 467 times)
Keen
Jr. Member
**
Offline Offline

Posts: 55


View Profile
« on: 09/June/2011, 08:41:15 PM »

Hi,

I have written a payment gateway. Sometimes the PSP gives a callback 2 times.
Therefore 2 income records are created.
Is there a way to solve this?

Thanks
Logged
netshine
Administrator
Hero Member
*****
Offline Offline

Posts: 4,563


View Profile
« Reply #1 on: 10/June/2011, 09:23:47 AM »

Firstly I would try to determine why they send 2 callbacks. Are the 2 callbacks identical? Paypal for example, will sometimes send 2 IPN callbacks - one for confirming the payment, and another to confirm the subscription has been set up. As nBill is only interested in the payment, the gateway script checks the parameters sent by the PSP and discards the unwanted callback. If the parameters being sent to you by the PSP are identical in both cases, you should probably contact the PSP and ask why. In any case, you could make a record in the database that a callback has been received for a given g_tx_id, so that you can discard any duplicates.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!