Paypal IPN procedure
I would be grateful for any advice on the above.
I am completing (i hope) my paypal IPN settings, and on completing the transaction I click on the 'Return to Merchant' button, where i get redirected to my 'invalid transaction' page.
The transaction is being verified, so there must be an error on my IPN page
I have configured my paypal IPN page as follows...
Check xaction ID from paypal
If not a duplicate..
Add row to payment table
Add row(s) to cart table
Update stock level of items which were in the cart
Update order status in the order table to 'confirmed'
send an email to myself confirming a valid transaction
go to checkout success page
if xactionID is duplicate
send an email to myself confirming a duplicate transaction
go to duplicate xaction page
if xactionID is invalid
send an email to myself confirming a invalid transaction
go to invalid xaction page
I checked my emails and I am getting 2 emails, one after the other, the first showing invalid transaction, the second showing valid transaction.
my confirm.php page has a return value of my IPN page, and as the transaction is valid, i can't work out why I'm getting the error.