gpt4 book ai didi

php - PayPal CreateRecurringPaymentProfile 错误 11502 - 无效 token

转载 作者:可可西里 更新时间:2023-11-01 00:33:56 33 4
gpt4 key购买 nike

我正在使用 PayPal 的 API 设置定期付款。首先,我将以下参数发送到 SetExpressCheckout:

Array
(
[METHOD] => SetExpressCheckout
[USER] => XXX
[PWD] => XXX
[SIGNATURE] => XXX
[VERSION] => 98.0
[AMT] => 0
[MAXAMT] => 99.00
[RETURNURL] => http://google.com
[CANCELURL] => http://google.com
[L_BILLINGTYPE0] => RecurringPayments
[L_BILLINGAGREEMENTDESCRIPTION0] => 99.00 per month till stopped
)

这会生成如下响应:

Array
(
[TOKEN] => EC-90P39652RF345525U
[TIMESTAMP] => 2013-02-08T17:09:24Z
[ACK] => Success
[VERSION] => 98.0
)

使用创建的计费协议(protocol)中的描述和 token ,我将以下参数发送到 CreateRecurringPaymentsProfile:

Array
(
[METHOD] => CreateRecurringPaymentsProfile
[USER] => XXX
[PWD] => XXX
[SIGNATURE] => XXX
[TOKEN] => EC-90P39652RF345525U
[PROFILESTARTDATE] => Feb 22 2013 17:09:24
[DESC] => 99.00 per month till stopped
[BILLINGPERIOD] => Month
[BILLINGFREQUENCY] => 12
[AMT] => 99.00
[CURRENTCYCODE] => USD
[CREDITCARDTYPE] => VISA
[ACCT] => 1234123412341234
[EXPDATE] => 012014
[CVV2] => 123
[EMAIL] => fake@example.com
[STREET] => 123 Main St
[CITY] => New York City
[STATE] => NY
[COUNTRYCODE] => US
[ZIP] => 12345
)

在我看来一切都很好,但它失败了:

Array
(
[TIMESTAMP] => 2013-02-08T17:09:24Z
[ACK] => Failure
[VERSION] => 98.0
[L_ERRORCODE0] => 11502
[L_SHORTMESSAGE0] => Invalid Token
[L_LONGMESSAGE0] => The token is invalid
[L_SEVERITYCODE0] => Error
)

非常感谢任何帮助!

最佳答案

在调用 CreateRecurringPaymentsProfile 之前,您需要将买家重定向到 PayPal 以批准定期付款。您的两个 API 响应的时间戳相同,这告诉我您一收到 SetExpressCheckout 的响应就调用了 CreateRecurringPaymentsProfile。从 SetExpressCheckout 收到回复后,您需要将买家重定向到 PayPal。

关于php - PayPal CreateRecurringPaymentProfile 错误 11502 - 无效 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14777899/

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