gpt4 book ai didi

Paypal : invalid token only in DoExpressCheckoutPayment method

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

我开始使用 PayPal,我的第一项工作是在我们的网站上调试它。

实际上,当我们到达订单末尾时,它工作正常,但我们在日志中得到一个堆栈:“无效 token (#10410:无效 token )”。当调用 doExpressCheckoutPayment 时会发生这种情况,并且似乎没有 token ,也没有 payerid,因此会引发错误。所有其他信息似乎都已正确填写。

调用 doExpressCheckoutPayment 的调试结果如下:

[DoExpressCheckoutPayment] => Array
(
[TOKEN] =>
[PAYERID] =>
[PAYMENTACTION] => Sale
[AMT] => 4.16
[CURRENCYCODE] => EUR
[BUTTONSOURCE] => Varien_Cart_EC_FR
[NOTIFYURL] => *
[RETURNFMFDETAILS] => 1
[ITEMAMT] => 3.36
[TAXAMT] => 0.80
[SHIPPINGAMT] => 0.00
[L_NUMBER0] => *
[L_NAME0] => *
[L_QTY0] => 1
[L_AMT0] => 4.10
[L_NUMBER1] =>
[L_NAME1] => Discount
[L_QTY1] => 1
[L_AMT1] => -0.74
[BUSINESS] =>
[EMAIL] => *
[FIRSTNAME] => *
[LASTNAME] => *
[MIDDLENAME] =>
[SALUTATION] =>
[SUFFIX] =>
[COUNTRYCODE] => *
[STATE] => *
[CITY] => *
[STREET] => *
[ZIP] => *
[PHONENUM] => *
[SHIPTOCOUNTRYCODE] => *
[SHIPTOSTATE] => *
[SHIPTOCITY] => *
[SHIPTOSTREET] => *
[SHIPTOZIP] => *
[SHIPTOPHONENUM] => *
[SHIPTOSTREET2] =>
[STREET2] =>
[SHIPTONAME] => *
[ADDROVERRIDE] => 1
[METHOD] => DoExpressCheckoutPayment
[VERSION] => 72.0
[USER] => ****
[PWD] => ****
[SIGNATURE] => ****
)

[response] => Array
(
[TIMESTAMP] => 2013-03-07T15:01:45Z
[CORRELATIONID] => 64adbc2375f59
[ACK] => Failure
[VERSION] => 72.0
[BUILD] => 5331358
[L_ERRORCODE0] => 10410
[L_SHORTMESSAGE0] => Invalid token
[L_LONGMESSAGE0] => Invalid token.
[L_SEVERITYCODE0] => Error
)

问题是,就在这个方法被调用之后,setExpressCheckout 被调用并且它是成功的,所以订单被正确放置。

这是调用 setExpressCheckout 时的成功响应:

[response] => Array
(
[TOKEN] => EC-5UG654898R029060W
[TIMESTAMP] => 2013-03-07T15:01:48Z
[CORRELATIONID] => 348b58c6200c1
[ACK] => Success
[VERSION] => 72.0
[BUILD] => 5331358
)

我不明白为什么在执行 doExpressCheckoutPayment 时会抛出错误,而在执行 setExpressCheckout 时却没有检测到任何错误并且无论如何都接受了销售... .

方法调用的顺序有问题吗?我的意思是,是否应该在 doExpressCheckoutPayment 之前调用 setExpressCheckout

我们正面临 PayPal 的另一个问题,我希望解决这个问题会解决另一个问题....

非常感谢你们的帮助!

塞布

最佳答案

SetExpressCheckout应该首先发生——你得到的 token 是你重定向客户浏览器的东西,当他们返回时,他们将在 URL 中有 token ,如果你需要的话,这时你可以 getExpressCheckoutDetails查看他们的送货地址和相关信息,最后运行 doExpressCheckoutPayment 提交交易。

重申一下:您从 setEC 获得一个有效 token ,您在重定向中使用此 token ,您将此 token 返回附加到客户返回的 RETURNURL ,并且您在任何后续的 getECdoEC 调用中引用此 token 。

关于 Paypal : invalid token only in DoExpressCheckoutPayment method,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15274957/

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