gpt4 book ai didi

php - 获取 CreateRecurringPaymentsProfile 的 "Invalid Token"错误

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

我正在使用 angelleye php 库来创建 RecurringPaymentsProfile 并遵循 4 个步骤:

1、设置ExpressCheckout

2、重定向到www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=tokenvalue

3、获取ExpressCheckoutDetails

4、DoExpressCheckoutPayment

5、创建RecurringPaymentsProfile

除了 CreateRecurringPaymentsProfile 之外,上述所有步骤都已通过...我的想法已经用完了,感谢您的帮助。

我的请求/响应的原始值是:

原始请求

    USER=hide.hide-facilitator_api1.gmail.com
PWD=hide
VERSION=98.0
BUTTONSOURCE=AngellEYE_PHPClass
SIGNATURE=hide
METHOD=GetExpressCheckoutDetails
TOKEN=EC-55V363450P8173204

原始响应

    TOKEN=EC-55V363450P8173204
BILLINGAGREEMENTACCEPTEDSTATUS=0
CHECKOUTSTATUS=PaymentActionNotInitiated
TIMESTAMP=2014-07-01T21:26:27Z
CORRELATIONID=88436244ae580
ACK=Success
VERSION=98.0
BUILD=11624049
EMAIL=%40yahoo.com
PAYERID=hide
PAYERSTATUS=verified
FIRSTNAME=Jacqueline
LASTNAME=Dias
COUNTRYCODE=US
CURRENCYCODE=USD
AMT=10.00
ITEMAMT=10.00
SHIPPINGAMT=0.00
HANDLINGAMT=0.00
TAXAMT=0.00
CUSTOM=1%7c1%7c8561112555243
DESC=Plan%20Details:%201-8561112555243
INVNUM=8561112555243
NOTIFYURL=PayPalIPN
INSURANCEAMT=0.00
SHIPDISCAMT=0.00
L_NAME0=Plan%20Details:%201-8561112555243
L_NUMBER0=na
L_QTY0=1
L_TAXAMT0=0.00
L_AMT0=10.00
L_DESC0=Plan%20Details:%201-8561112555243
L_ITEMWEIGHTVALUE0=%20%20%200.00000
L_ITEMLENGTHVALUE0=%20%20%200.00000
L_ITEMWIDTHVALUE0=%20%20%200.00000
L_ITEMHEIGHTVALUE0=%20%20%200.00000
L_ITEMCATEGORY0=Digital
PAYMENTREQUEST_0_CURRENCYCODE=USD
PAYMENTREQUEST_0_AMT=10.00
PAYMENTREQUEST_0_ITEMAMT=10.00
PAYMENTREQUEST_0_SHIPPINGAMT=0.00
PAYMENTREQUEST_0_HANDLINGAMT=0.00
PAYMENTREQUEST_0_TAXAMT=0.00
PAYMENTREQUEST_0_CUSTOM=1%7c1%7c8561112555243
PAYMENTREQUEST_0_DESC=Plan%20Details:%201-8561112555243
PAYMENTREQUEST_0_INVNUM=8561112555243
PAYMENTREQUEST_0_NOTIFYURL=PayPalIPN
PAYMENTREQUEST_0_INSURANCEAMT=0.00
PAYMENTREQUEST_0_SHIPDISCAMT=0.00
PAYMENTREQUEST_0_NOTETEXT=This%20is%20a%20test%20note%20before%20ever%20having%20left%20the%20web%20site.
PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false
PAYMENTREQUEST_0_ADDRESSNORMALIZATIONSTATUS=None
L_PAYMENTREQUEST_0_NAME0=Plan%20Details:%201-8561112555243
L_PAYMENTREQUEST_0_NUMBER0=na
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_TAXAMT0=0.00
L_PAYMENTREQUEST_0_AMT0=10.00
L_PAYMENTREQUEST_0_DESC0=Plan%20Details:%201-8561112555243
L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE0=%20%20%200.00000
L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0=%20%20%200.00000
L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0=%20%20%200.00000
L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0=%20%20%200.00000
L_PAYMENTREQUEST_0_ITEMCATEGORY0=Digital
PAYMENTREQUESTINFO_0_ERRORCODE=0

原始请求

    USER=hide.hide-facilitator_api1.gmail.com
PWD=hide
VERSION=98.0
BUTTONSOURCE=AngellEYE_PHPClass
SIGNATURE=hide
METHOD=DoExpressCheckoutPayment
TOKEN=EC-55V363450P8173204
PAYERID=hide
RETURNFMFDETAILS=1
BUTTONSOURCE=hide
PAYMENTREQUEST_0_AMT=10.00
PAYMENTREQUEST_0_CURRENCYCODE=USD
PAYMENTREQUEST_0_ITEMAMT=10.00
PAYMENTREQUEST_0_DESC=Plan+Details:+1-8561112555243
PAYMENTREQUEST_0_INVNUM=8561112555243
PAYMENTREQUEST_0_NOTIFYURL=PayPalIPN
PAYMENTREQUEST_0_PAYMENTACTION=Sale
L_PAYMENTREQUEST_0_NAME0=Plan+Details:+1-8561112555243
L_PAYMENTREQUEST_0_DESC0=Plan+Details:+1-8561112555243
L_PAYMENTREQUEST_0_AMT0=10.00
L_PAYMENTREQUEST_0_NUMBER0=na
L_PAYMENTREQUEST_0_QTY0=1

原始响应

    TOKEN=EC-55V363450P8173204
SUCCESSPAGEREDIRECTREQUESTED=false
TIMESTAMP=2014-07-01T21:26:30Z
CORRELATIONID=c299c1d456a1f
ACK=Success
VERSION=98.0
BUILD=11624049
INSURANCEOPTIONSELECTED=false
SHIPPINGOPTIONISDEFAULT=false
PAYMENTINFO_0_TRANSACTIONID=7WV52893XW736654U
PAYMENTINFO_0_TRANSACTIONTYPE=cart
PAYMENTINFO_0_PAYMENTTYPE=instant
PAYMENTINFO_0_ORDERTIME=2014-07-01T21:26:30Z
PAYMENTINFO_0_AMT=10.00
PAYMENTINFO_0_FEEAMT=0.59
PAYMENTINFO_0_TAXAMT=0.00
PAYMENTINFO_0_CURRENCYCODE=USD
PAYMENTINFO_0_PAYMENTSTATUS=Completed
PAYMENTINFO_0_PENDINGREASON=None
PAYMENTINFO_0_REASONCODE=None
PAYMENTINFO_0_PROTECTIONELIGIBILITY=Ineligible
PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE=None
PAYMENTINFO_0_SECUREMERCHANTACCOUNTID=hide
PAYMENTINFO_0_ERRORCODE=0
PAYMENTINFO_0_ACK=Success

原始请求

    USER=hide.hide-facilitator_api1.gmail.com
PWD=hide
VERSION=98.0
BUTTONSOURCE=AngellEYE_PHPClass
SIGNATURE=hide
METHOD=CreateRecurringPaymentsProfile
TOKEN=EC-55V363450P8173204
PROFILESTARTDATE=2014-07-01T21:27:30Z
DESC=Plan+Details:+1-8561112555243
AUTOBILLAMT=1
BILLINGPERIOD=Year
BILLINGFREQUENCY=1
TOTALBILLINGCYCLES=0
AMT=10.00
CURRENCYCODE=USD
PAYERID=hide
COUNTRYCODE=US
L_PAYMENTREQUEST_0_ITEMCATEGORY0=Digital
L_PAYMENTREQUEST_0_NAME0=Plan+Details:+1-8561112555243
L_PAYMENTREQUEST_0_DESC0=Plan+Details:+1-8561112555243
L_PAYMENTREQUEST_0_AMT0=10.00
L_PAYMENTREQUEST_0_NUMBER0=na
L_PAYMENTREQUEST_0_QTY0=1

原始响应

    TIMESTAMP=2014-07-01T21:26:31Z
CORRELATIONID=79d7deb94f82f
ACK=Failure
VERSION=98.0
BUILD=11457922
L_ERRORCODE0=11502
L_SHORTMESSAGE0=Invalid%20Token
L_LONGMESSAGE0=The%20token%20is%20invalid
L_SEVERITYCODE0=Error

最佳答案

我在这里没有看到您的 SetExpressCheckout 请求..??

您需要确保 SEC 请求包含支持其定期付款的计费协议(protocol)参数。由于您正在使用我的库,请查看 SetExpressCheckout.php 模板中的以下内容:

$BillingAgreements = array();
$Item = array(
'l_billingtype' => '', // Required. Type of billing agreement. For recurring payments it must be RecurringPayments. You can specify up to ten billing agreements. For reference transactions, this field must be either: MerchantInitiatedBilling, or MerchantInitiatedBillingSingleSource
'l_billingagreementdescription' => '', // Required for recurring payments. Description of goods or services associated with the billing agreement.
'l_paymenttype' => '', // Specifies the type of PayPal payment you require for the billing agreement. Any or IntantOnly
'l_billingagreementcustom' => '' // Custom annotation field for your own use. 256 char max.
);

array_push($BillingAgreements, $Item);

您只需为结算类型使用值“RecurringPayments”,然后再创建描述。该描述需要与您最后在 CreateRecurringPaymentsProfile 中发送的描述完全匹配。当然,您需要确保将 $BillingAgreements 添加到 $PayPalRequestData 以便相应地传递它。

将计费协议(protocol)参数添加到 SEC 请求后, token 将对 CRPP 有效。

关于php - 获取 CreateRecurringPaymentsProfile 的 "Invalid Token"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24520032/

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