问题
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:
In the SetExpressCheckout documenation for
NOTIFYURLthey say:The notify URL applies only to
DoExpressCheckoutPayment. This value is ignored when set inSetExpressCheckoutorGetExpressCheckoutDetails.I don't have a one-time payment with ExpressCheckout. I am just creating a recurring profile. So I am skipping the
DoExpressCheckoutPaymentcall like it is specified in the Recurring Payments integration guide. Actually if I however do theDoExpressCheckoutPaymentcall it would not be valid, because I have set the amount to0.According to
1.theNOTIFYURL(to be precisePAYMENTREQUEST_0_NOTIFYURL) would be ignored unless aDoExpressCheckoutPaymentis called. However I have tried to set it in theSetExpressCheckoutPaymentcall.Using the IPN simulator I am successfully receiving IPN notifications.
When successfully creating a new Recurring Payments profile using CreateRecurringPaymentsProfile I am not receiving an IPN notification.
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