gpt4 book ai didi

paypal - CreateRecurringPaymentsProfile 给出错误 11502 : Invalid Token

转载 作者:太空宇宙 更新时间:2023-11-03 15:40:34 24 4
gpt4 key购买 nike

当我调用 CreateRecurringPaymentsProfile NVP API 时,我不断收到无效 token 错误。

请在下面找到我的 API 调用顺序:

设置ExpressCheckout

METHOD = SetExpressCheckout
VERSION = 98
PWD = <pwd>
USER = <user>
SIGNATURE = <signature>
ReturnUrl = http://google.com
CANCELURL = http://google.com
PAYMENTREQUEST_0_PAYMENTACTION = Authorization
PAYMENTREQUEST_0_AMT = 100.00
PAYMENTREQUEST_0_CURRENCYCODE = USD
L_PAYMENTREQUEST_0_NAME0 = Item1
L_PAYMENTREQUEST_0_QTY0 = 1
L_PAYMENTREQUEST_0_AMT0 = 100.00
PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID = rahul.katikineni@sap.com
LOCALECODE = US
L_BILLINGTYPE0 = RecurringPayments
L_BILLINGAGREEMENTDESCRIPTION0 = SameEveryTime

我以 ACK=*Success* 返回一个 token 作为响应。然后我使用 URL [ https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token= 导航到 paypal 网站token] 并使用 paypal 帐户登录,然后单击“同意并继续”。

同意并成功重定向到重定向 URL 后,我使用以下参数调用 GetExpressCheckoutDetails API

METHOD = GetExpressCheckoutDetails
VERSION = 98
PWD = <pwd>
USER = <user>
SIGNATURE = <signature>
TOKEN = <token from the SetExpressCheckout response>

成功获取付款人详细信息作为响应后,我进行了 DoExpressCheckoutPayment API 调用

METHOD = DoExpressCheckoutPayment
VERSION = 98
PWD = <pwd>
USER = <user>
SIGNATURE = <signature>
TOKEN = <token from the SetExpressCheckout response>
PAYERID = <payer ID from the GetExpressCheckoutDetails response>
PAYMENTREQUEST_0_AMT = 100
PAYMENTREQUEST_0_PAYMENTACTION = Sale
PAYMENTREQUEST_0_CURRENCYCODE = USD
L_PAYMENTREQUEST_0_NAME0 = Item1
L_PAYMENTREQUEST_0_QTY0 = 1
L_PAYMENTREQUEST_0_AMT0 = 100.00
PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID = rahul.katikineni@sap.com

我现在进行 CreateRecurringPaymentsProfile API 调用

METHOD = CreateRecurringPaymentsProfile
VERSION = 98
PWD = <pwd>
USER = <user>
SIGNATURE = <signature>
TOKEN = <token from the SetExpressCheckout response>
PAYERID = <payer ID from the GetExpressCheckoutDetails response>
DESC = SameEveryTime
BILLINGPERIOD = Month
BILLINGFREQUENCY = 1
PROFILESTARTDATE = 2013-05-16T00:00:00Z
MAXFAILEDPAYMENTS = 1
AMT = 100.00
CURRENCYCODE = USD
L_PAYMENTREQUEST_0_NAME0 = Item1
L_PAYMENTREQUEST_0_QTY0 = 1
L_PAYMENTREQUEST_0_AMT0 = 100.00
AUTOBILLAMT = AddToNextBilling

我不断收到以下回复

TIMESTAMP = 2013-04-17T05:31:24Z
CORRELATIONID = d2c1d30c1d31
ACK = Failure
VERSION = 98
BUILD = 5650305
L_ERRORCODE0 = 11502
L_SHORTMESSAGE0 = Invalid Token
L_LONGMESSAGE0 = The token is invalid
L_SEVERITYCODE0 = Error

我曾尝试在许多论坛中寻找解决方案,但无法弄清楚是否遗漏了任何参数。

谁能帮我解决这个问题?

提前致谢,拉胡尔

最佳答案

Paypal 返回的这个错误是模糊的。此错误的最常见原因是 SetExpressCheckout 调用中的 BillingDescription 值与 CreateRecurringprofile 调用中的 ScheduleDEtails.Description 之间存在差异。确保这两个完全相同才能正常工作。

例如:

public CreateRecurringPaymentsProfileResponseType createRecurringProfile(string tokenin){
var scheduleDetails = new ScheduleDetailsType();
scheduleDetails.PaymentPeriod = paymentPeriod;
scheduleDetails.Description = "RecurringBilling";
}
public SetExpressCheckoutResponseType setExpressCheckout()
{
....
var billingAgreement = new BillingAgreementDetailsType();

billingAgreement.BillingAgreementDescription = "RecurringBilling";
billingAgreement.BillingType = BillingCodeType.RECURRINGPAYMENTS;
billingAgreement.PaymentType = MerchantPullPaymentCodeType.ANY;

ecDetails.BillingAgreementDetails.Add(billingAgreement);
...
}

关于paypal - CreateRecurringPaymentsProfile 给出错误 11502 : Invalid Token,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16053092/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com