Adaptive Payments Paypal : return url without data?

守給你的承諾、 提交于 2019-12-11 05:09:40

问题


I'm testing Adaptive Payments of PayPal but I can't understand how I can have some valid data info from PayPal when user is redirect after success payment.

PayPal not return data to this URL ? I am forced to use IPN ? The fact that it is called "ReturnUrl" is in itself a reliable information? I have to make do by sending data via GET?

The only alternative is to use standard button with notify_url and redirect parameters with the PND ?

I'm so confused... :(


回答1:


  1. When the user returns the returnUrl endpoint, you make a call for the PaymentDetails API and check the status and proceed.
  2. To handle the corner case where the user might have paid but didn't return to your site, await the IPN message to proceed with your order shipment etc.,
  3. If the user cancels a payment they will be taken the cancelUrl endpoint and you can handle the flow accordingly
  4. In case of errors (like limit exceeded, currency not supported etc.,) the Pay operation will actually throw an error and you will be able to handle this as part of the error / exception catch flow.

Please use the following parameters when making the API call

returnUrl The URL to which the sender’s browser is redirected after approving a payment on paypal.com

cancelUrl The URL to which the sender’s browser is redirected if the sender cancels the approval for a payment on paypal.com.

ipnNotificationUrl The URL to which all IPN messages for this payment are sent

Suggest downloading the SDK and look at the samples that are bundled as part of it.

https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index



来源:https://stackoverflow.com/questions/14171251/adaptive-payments-paypal-return-url-without-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!