I have created a payment module based on a combination of paypal and nochex. It's for a french (CiC) payment gateway that uses a predetermined callback to notify my site whenever a card is accepted or declined.
The callback aspect works fine and, just like the paypal module I recreate the session and create the order when the callback indicates a good transaction.
The problem I'm having is that, after completing payment, when the customer clicks on the "return" link that brings them back to checkout_process (same setting as paypal ipn uses) a second order is generated with the same details.
I've tried a number of different things in the before_process() function of my payment module to prevent the second order being created but keep ending up with an empty page if I do that. With nothing in the before_process() function the user is correctly redirected to the checkout_success and given a new number.
I've spent hours scanning the paypal and nochex code for a clue but I can't see anything those modules do that mine isn't doing....
Any ideas... ?
Bookmarks