Y0lk
Y0lk

Reputation: 396

Handling canceled Paypal payments

I am currently using Paypal as a payment system on a website I'm working and so far everything works great...except one thing. Once the payment is complete, Paypal calls the IPN page I provided and everything's good. But if the person cancels the payment, I'm not sure how I'm supposed to know that since Paypal doesn't call the IPN in that case (at least, from what I understand).

Sure, if the person clicks on "Cancel and return to the website", he will come back to the Cancel page I provided. But what if he just closes the paypal page? He would never return to my website's cancel page.

In some cases, I guess it wouldn't be much of a problem. I'm sure there is a way to know if the payment is canceled but I just can't find it, which is why I'm here.

Thanks for your help.

Upvotes: 1

Views: 670

Answers (1)

ariefbayu
ariefbayu

Reputation: 21979

you should be able to implement some sort of confirmation field in your transaction table, eg: ipn_confirmed.

You set it to default as unconfirmed and set it as confirmed when paypal's IPN return the value. Then, you will only process request that is confirmed. If there is a glitch in the matrix, you will need your customer to contact you and send his/her paypal's transaction info and match is with your data. If it match, process it.

Upvotes: 1

Related Questions