我做的顺序:
- SetExpressCheckout
- GetExpresscheckoutDetails
- 创建RecurringPaymentsProfile
最后一步失败并出现错误:11502 '令牌无效'。每当我删除 SellerPaypalAccountId 时,定期付款就可以毫无问题地开始工作。我已在 b.cwik_1354106610_biz@xxx 沙盒 API 设置中授予了 Seller_1341842378_biz_api1.xxx 的所有权限...
进行额外的步骤 DoExpressCheckout 没有帮助。我在生产环境中遇到了同样的问题
'CANCELURL': 'xxx',
'L_BILLINGAGREEMENTDESCRIPTION0': u'Donation to xxx',
'L_BILLINGTYPE0': 'RecurringPayments',
'MAXAMT': '3',
'METHOD': 'SetExpressCheckout',
'PAYMENTREQUEST_0_AMT': 0,
'PAYMENTREQUEST_0_CURRENCYCODE': 'GBP',
'PAYMENTREQUEST_0_INVNUM': u'Donation via xxx',
'PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID': 'b.cwik_1354106610_biz@xxx',
'PWD': 'xxx',
'RETURNURL': 'xxx',
'SIGNATURE': 'xxx',
'USER': 'seller_1341842378_biz_api1.xxx',
'VERSION': '72.0'}
DEBUG 2012-11-28 12:51:00,001 response 5196 PayPal NVP API Response:
{u'ACK': [u'Success'],
u'BUILD': [u'4181146'],
u'CORRELATIONID': [u'6195a72b374'],
u'TIMESTAMP': [u'2012-11-28T12:50:59Z'],
u'TOKEN': [u'EC-87T24113GH453193G'],
u'VERSION': [u'72.0']}
{'METHOD': 'GetExpressCheckoutDetails',
'PWD': 'xxx',
'SIGNATURE': 'xxx',
'TOKEN': u'EC-87T24113GH453193G',
'USER': 'seller_1341842378_biz_api1.xxx',
'VERSION': '72.0'}
DEBUG 2012-11-28 12:51:32,763 response 5196 PayPal NVP API Response:
{u'ACK': [u'Success'],
u'ADDRESSSTATUS': [u'Confirmed'],
u'AMT': [u'0.00'],
u'BILLINGAGREEMENTACCEPTEDSTATUS': [u'1'],
u'BUILD': [u'4181146'],
u'CHECKOUTSTATUS': [u'PaymentActionNotInitiated'],
u'CORRELATIONID': [u'3d9bfd2b3027b'],
u'COUNTRYCODE': [u'GB'],
u'CURRENCYCODE': [u'GBP'],
u'EMAIL': [u'buyer_1341841276_per@xxx'],
u'FIRSTNAME': [u'Bartosz'],
u'HANDLINGAMT': [u'0.00'],
u'INSURANCEAMT': [u'0.00'],
u'INVNUM': [u'Donation via xxx'],
u'LASTNAME': [u'\xc4\x86wik\xc5\x82owski'],
u'PAYERID': [u'ZXHBVW7PNHZDL'],
u'PAYERSTATUS': [u'verified'],
u'PAYMENTREQUESTINFO_0_ERRORCODE': [u'0'],
u'PAYMENTREQUEST_0_ADDRESSSTATUS': [u'Confirmed'],
u'PAYMENTREQUEST_0_AMT': [u'0.00'],
u'PAYMENTREQUEST_0_CURRENCYCODE': [u'GBP'],
u'PAYMENTREQUEST_0_HANDLINGAMT': [u'0.00'],
u'PAYMENTREQUEST_0_INSURANCEAMT': [u'0.00'],
u'PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED': [u'false'],
u'PAYMENTREQUEST_0_INVNUM': [u'Donation via xxx'],
u'PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID': [u'b.cwik_1354106610_biz@xxx'],
u'PAYMENTREQUEST_0_SHIPDISCAMT': [u'0.00'],
u'PAYMENTREQUEST_0_SHIPPINGAMT': [u'0.00'],
u'PAYMENTREQUEST_0_SHIPTOCITY': [u'Wolverhampton'],
u'PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE': [u'GB'],
u'PAYMENTREQUEST_0_SHIPTOCOUNTRYNAME': [u'United Kingdom'],
u'PAYMENTREQUEST_0_SHIPTONAME': [u'Bartosz \xc4\x86wik\xc5\x82owski'],
u'PAYMENTREQUEST_0_SHIPTOSTATE': [u'West Midlands'],
u'PAYMENTREQUEST_0_SHIPTOSTREET': [u'1 Main Terrace'],
u'PAYMENTREQUEST_0_SHIPTOZIP': [u'W12 4LQ'],
u'PAYMENTREQUEST_0_TAXAMT': [u'0.00'],
u'SHIPDISCAMT': [u'0.00'],
u'SHIPPINGAMT': [u'0.00'],
u'SHIPTOCITY': [u'Wolverhampton'],
u'SHIPTOCOUNTRYCODE': [u'GB'],
u'SHIPTOCOUNTRYNAME': [u'United Kingdom'],
u'SHIPTONAME': [u'Bartosz \xc4\x86wik\xc5\x82owski'],
u'SHIPTOSTATE': [u'West Midlands'],
u'SHIPTOSTREET': [u'1 Main Terrace'],
u'SHIPTOZIP': [u'W12 4LQ'],
u'TAXAMT': [u'0.00'],
u'TIMESTAMP': [u'2012-11-28T12:51:32Z'],
u'TOKEN': [u'EC-87T24113GH453193G'],
u'VERSION': [u'72.0']}
{'AMT': u'3',
'BILLINGFREQUENCY': '1',
'BILLINGPERIOD': 'Month',
'CURRENCYCODE': u'GBP',
'DESC': u'Donation via xxx',
'METHOD': 'CreateRecurringPaymentsProfile',
'PAYERID': u'ZXHBVW7PNHZDL',
'PROFILESTARTDATE': '2012-11-28T14:51:32Z',
'PWD': 'xxx',
'SIGNATURE': 'xxx',
'TOKEN': u'EC-87T24113GH453193G',
'USER': 'seller_1341842378_biz_api1.xxx',
'VERSION': '72.0'}
ERROR 2012-11-28 12:51:33,892 interface 5196 PayPal NVP Query Response
ERROR 2012-11-28 12:51:33,892 interface 5196 {u'ACK': [u'Failure'],
u'BUILD': [u'4181146'],
u'CORRELATIONID': [u'540ba10f7a295'],
u'L_ERRORCODE0': [u'11502'],
u'L_LONGMESSAGE0': [u'The token is invalid'],
u'L_SEVERITYCODE0': [u'Error'],
u'L_SHORTMESSAGE0': [u'Invalid Token'],
u'TIMESTAMP': [u'2012-11-28T12:51:33Z'],
u'VERSION': [u'72.0']}