PayPal Using Payflow to create Recurring Payment with PayPal account

*爱你&永不变心* 提交于 2019-12-08 13:19:30

I don't have the code but I can direct you on how you can create the recurring profile using the PayPal Payments . It includes the four steps :

1. Call the SetExpressCheckout API

VENDOR=XXXXXXX&PARTNER=XXXXXXX&USER=XXXXXXXXX&PWD=XXXXXX&TRXTYPE=A&ACTION=S&TENDER=P&RETURNURL=http://return.com&CANCELURL=http://cancel.com&AMT=0.00&BA_DESC=purchase Time magazine&BILLINGTYPE=MerchantInitiatedBilling&PAYMENTTYPE=any&BA_CUSTOM=magazine subscription

NVP Response:
RESULT=0
RESPMSG=Verified
TOKEN=EC-8DA60888D41196708
CORRELATIONID=f4df94a3345b6 

2.Redirect the customer using the generated token :

https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-8DA60888D41196708

3. Once the buyer accept the agreement use the token to get the billing agreement id

NVP Request:
VENDOR=XXXXXX&PARTNER=XXXXXXX&USER=XXXXXXXX&PWD=XXXXX&TRXTYPE=A&ACTION=X&TENDER=P&TOKEN=EC-8DA60888D41196708

NVP Response:
RESULT=0
PNREF=B1PP7A2F8154
RESPMSG=Approved
TOKEN=EC-8DA60888D41196708
CORRELATIONID=49d6b0037408
BAID=B-6A290557S1180001J 

4. After getting BAID , make a call to create the recurring billing using BAID

NVP Request:
VENDOR=XXXX&PARTNER=XXXX&USER=XXXXXX&PWD=XXXXX&TRXTYPE=R&TENDER=P&ACTION=A&PROFILENAME=RegularSubscription&AMT=4.46&BAID=B-6A290557S1180001J&START=09212014&PAYPERIOD=WEEK&TERM=12&MAXFAILPAYMENTS=1&RETRYNUMDAYS=1&CURRENCY=USD

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