开发者

Paypal IPN processing after payment

I have IPN controller which is validating IPN and then validating some fields according with that article

After user clicking pay on paypal website the ipn sending to my ipn controller and at the same time user getting redirected back to my web site(after paypal controller) from paypal web site.

But the problem is, there is not enough time for my IPN controller to finish all the logic and user landed to my website on after paypal controller b开发者_如何学Goefore IPN processing finished. So i cant say to user is there was any error or is it was successful.

My be some one may share their experience with that? What I can do? I would redirect user from paypal back to my website only after ipn processing finished, so i could be able to say to user is it was successful or not, etc.

On my after paypal controller i want to check if the ipn processing was successful and than display related message.

Any thoughts?


IPN is separate from the end users experience.

You need 3 pages/actions: one for if paypal said "payment confirmed" another for if paypal said "payment failed" - these 2 pages mean nothing, the user could hack the site to see these pages, they are just there to let the user know what's going on.

Third page/action is for IPN, it's just a listener that waits for paypal's response. Once you get the response then you check against it to make sure everything is ok:

  • Make sure your email was paid
  • Make sure the price is right
  • Updates your db with "Paid!" marker, yada yada

You could then have a simple binding to ("Paid!") that updates when the user 'postsback' or you could have ajax do it async.

-- As a final point, I'm genuinely trying to find out here how to process/test the IPN and your obviously unresearched question has wasted my time. Do some research man.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜