How to set an IPN URL for PayPal Recurring Payments using ExpressCheckout?

橙三吉。 提交于 2019-12-03 11:39:48

问题


According to the PayPal documentation, it is not possible to have Instant Payment Notifications (IPN) for Recurring Payments when using ExpressCheckout.

Here is how I come up with that conclusion:

  1. In the SetExpressCheckout documenation for NOTIFYURL they say:

    The notify URL applies only to DoExpressCheckoutPayment. This value is ignored when set in SetExpressCheckout or GetExpressCheckoutDetails.

  2. I don't have a one-time payment with ExpressCheckout. I am just creating a recurring profile. So I am skipping the DoExpressCheckoutPayment call like it is specified in the Recurring Payments integration guide. Actually if I however do the DoExpressCheckoutPayment call it would not be valid, because I have set the amount to 0.

  3. According to 1. the NOTIFYURL (to be precise PAYMENTREQUEST_0_NOTIFYURL) would be ignored unless a DoExpressCheckoutPayment is called. However I have tried to set it in the SetExpressCheckoutPayment call.

  4. Using the IPN simulator I am successfully receiving IPN notifications.

  5. When successfully creating a new Recurring Payments profile using CreateRecurringPaymentsProfile I am not receiving an IPN notification.

  6. I did not find an API call related to the Recurring Payments which I can use to set a NOTIFYURL.

How can I set up an IPN URL for Recurring Payments using ExpressCheckout without an initial payment, INITAMT or other requiring DoExpressCheckoutPayment?


回答1:


You can set the IPN URL in your PayPal account, under your profile.




回答2:


Simply add "&NOTIFYURL=yoursite.com/ipnhandle" to your NVP string, if you want to set different IPN urls for your each transaction.



来源:https://stackoverflow.com/questions/16483448/how-to-set-an-ipn-url-for-paypal-recurring-payments-using-expresscheckout

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