我一直试图设置ExpressCheckout并定期付款,但我找不到解决方案。
查看文档(Recurring Payments With the Express Checkout API)后,该图给出了一个序列,其中最后调用了“CreateRecurringPaymentsProfile”。
现在,看一下其他文档(How to Create a Recurring Payments Profile with Express Checkout),解释的不同步骤给出了不同的顺序顺序,其中“CreateRecurringPaymentsProfile”直接出现在“GetExpressCheckoutDetails”之后。
我试图按照第二个例子,但我系统地收到错误。
有人能告诉我我到底需要做什么吗? 当然,一个实际的例子将非常受欢迎......
事先,非常感谢
我收到的错误是“INVALID TOKEN”。
以下是我发送的信息:
VERSION = 84.0
METHOD = CreateRecurringPaymentsProfile
LOCALECODE = FR
TOKEN = [我从SetExpressCheckout收到的那个]
PROFILESTARTDATE = [下次付款的日期]
BILLINGPERIOD =月
BILLINGFREQUENCY = 6
TOTALBILLINGCYCLES = 0
AMT = [与我在PAYMENTREQUEST_0_AMT中提到的相同]
AUTOBILLAMT = AddToNextBilling
CURRENCYCODE = EUR
MAXFAILEDPAYMENTS = 3
DESC = [与我在L_BILLINGAGREEMENTDESCRIPTION0中提到的相同]
L_PAYMENTREQUEST_0_NAME0 = [与我在SetExpressCheckout中使用的相同]
L_PAYMENTREQUEST_0_DESC0 = [与我在SetExpressCheckout中使用的相同]
L_PAYMENTREQUEST_0_AMT0 = [与我在SetExpressCheckout中使用的相同]
L_PAYMENTREQUEST_0_QTY0 = [与我在SetExpressCheckout中使用的相同]
L_PAYMENTREQUEST_0_TAXAMT0 = [与我在SetExpressCheckout中使用的相同]
我是否还需要提及: L_BILLINGAGREEMENTDESCRIPTION0& L_BILLINGTYPE0?
答案 0 :(得分:1)
如果您获得 11502无效令牌,您需要在SetEC API请求中传递以下变量:
BILLINGAGREEMENTDESCRIPTION =您的结算协议名称
BILLINGTYPE = RecurringPayments
请检查以下EC + RP流程的工作原理:
1)SetExpressChekout + BILLINGAGREEMENTDESCRIPTION和BILLINGTYPE变量
版本= 86.0
METHOD = SetExpressCheckout
RETURNURL = http://www.website.com/return.php
CANCELURL = http://www.website.com/cancel.php
PAYMENTREQUEST_0_CURRENCYCODE = USD
PAYMENTREQUEST_0_PAYMENTACTION =销售
L_BILLINGTYPE0 = RecurringPayments
L_BILLINGAGREEMENTDESCRIPTION0 = SameEveryTime
PAYMENTREQUEST_0_AMT = 1.00
PAYMENTREQUEST_0_ITEMAMT = 1.00
PAYMENTREQUEST_0_DESC =实验室
L_PAYMENTREQUEST_0_NAME0 =实验1 L_PAYMENTREQUEST_0_NUMBER0 = 10101
L_PAYMENTREQUEST_0_QTY0 = 1
L_PAYMENTREQUEST_0_AMT0 = 1.00
L_PAYMENTREQUEST_0_DESC0 =下载
2)登录您的PayPal帐户并点击“接受并继续”
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-2EJ022116H3067544
买家登录他的PayPal帐户并点击“同意并继续”按钮, 然后他将重定向到RETURNURL + token + PayerID:
http://www.website.com/return.php?token=EC-2EJ022116H3067544&PayerID=HHHAPCFUM9ULW
3)然后你可以运行CreateRecurringPaymentsProfile + token:
PROFILEREFERENCE = RPInvoice123
PROFILESTARTDATE = 2016-08-17T14:30:00Z
SUBSCRIBERNAME = Sub Scriber先生 METHOD = CreateRecurringPaymentsProfile
TOKEN = XXXXXXXXXXXXX
DESC = SameEveryTime
AMT = 1.00
BILLINGPERIOD =日
BILLINGFREQUENCY = 3
VERSION = 86.0
MAXFAILEDPAYMENTS = 1
L_PAYMENTREQUEST_0_AMT0 = 1.00
L_PAYMENTREQUEST_0_NAME0 =实验1 L_PAYMENTREQUEST_0_NUMBER0 = 10101
L_PAYMENTREQUEST_0_QTY0 = 1
L_BILLINGTYPE0 = RecurringPayments
L_BILLINGAGREEMENTDESCRIPTION0 = SameEveryTime
L_PAYMENTREQUEST_0_ITEMCATEGORY0 =数字
这是NVP响应:
的简档ID = <强> I-TOKEN123456 强>
PROFILESTATUS = ActiveProfile
TIMESTAMP = 2013-11-22T04:06:50Z
的correlationID = 2b5be15a871ff
ACK =成功
VERSION = 86.0
BUILD = 5908853
<强>文档强>: ECRecurringPayments
API参考(NVP)
SetExpressCheckout API request
CreateRecurringPayment API request