gpt4 book ai didi

Paypal GetExpressCheckoutDetails 缺少 PAYERID

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

(参见 https://developer.paypal.com/docs/integration/direct/identity/seamless-checkout/)

  1. 我们通过 OpenID(使用 PayPal 登录)让用户登录并接收访问 token 。
  2. 我们调用 SetExpressCheckout 给出 IDENTITYACCESSTOKEN
  3. 我们调用 GetExpressCheckoutDetails 并期望填充 PAYERID。它不存在于响应中。

没有 PAYERID,我无法调用 DoExpressCheckoutPayment。

我在下面附上了请求/响应数据。请注意,GetExpressCheckoutDetails 不包含 PAYERID。为什么会发生这种情况?

谢谢!

SetExpressCheckout Request:
array (size=23)
'METHOD' => string 'SetExpressCheckout' (length=18)
'PAYMENTREQUEST_0_ITEMAMT' => string '329.00' (length=6)
'PAYMENTREQUEST_0_AMT' => string '329.00' (length=6)
'PAYMENTREQUEST_0_TAXAMT' => string '0.00' (length=4)
'PAYMENTREQUEST_0_SHIPPINGAMT' => string '0.00' (length=4)
'PAYMENTREQUEST_0_CURRENCYCODE' => string 'USD' (length=3)
'RETURNURL' => string 'https://some.url/' (length=39)
'CANCELURL' => string 'https://some.url/' (length=25)
'VERSION' => string '106.0' (length=5)
'USER' => string 'secure-paypal_api1.somedomain.com' (length=30)
'PWD' => string 'XXXXXXXXXXXXXXXXX' (length=16)
'SIGNATURE' => string 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (length=56)
'NOSHIPPING' => string '1' (length=1)
'PAYMENTREQUEST_0_PAYMENTACTION' => string 'Sale' (length=4)
'HDRIMG' => string 'https://www.some.url/.jpg' (length=70)
'EMAIL' => string 'foo@foo.com' (length=23)
'CUSTOMERSERVICENUMBER' => string '1-111-111-1111' (length=14)
'ALLOWNOTE' => string '0' (length=1)
'IDENTITYACCESSTOKEN' => string '2nd3CS9HG1EWzTQGy6l.4n7CsilVWgkqn20bTuUfSXX' (length=43)
'L_PAYMENTREQUEST_0_NAME0' => string 'or3333' (length=6)
'L_PAYMENTREQUEST_0_AMT0' => string '329.00' (length=6)
'L_PAYMENTREQUEST_0_DESC0' => string 'Product name foobar' (length=31)
'L_PAYMENTREQUEST_0_QTY0' => string '1' (length=1)

SetExpressCheckout Response:
array (size=6)
'TOKEN' => string 'EC-4W147554UR614711B' (length=20)
'TIMESTAMP' => string '2014-01-17T20:41:50Z' (length=20)
'CORRELATIONID' => string '4ef48694990' (length=11)
'ACK' => string 'Success' (length=7)
'VERSION' => string '106.0' (length=5)
'BUILD' => string '9285531' (length=7)

GetExpressCheckoutDetails Request:
array (size=6)
'METHOD' => string 'GetExpressCheckoutDetails' (length=25)
'TOKEN' => string 'EC-4W147554UR614711B' (length=20)
'VERSION' => string '106.0' (length=5)
'USER' => string 'secure-paypal_api1.sylvane.com' (length=30)
'PWD' => string 'XXXXXXXXXXXXXXXX' (length=16)
'SIGNATURE' => string 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (length=56)

GetExpressCheckoutDetails Response:
array (size=44)
'TOKEN' => string 'EC-4W147554UR614711B' (length=20)
'CHECKOUTSTATUS' => string 'PaymentActionNotInitiated' (length=25)
'TIMESTAMP' => string '2014-01-17T20:41:50Z' (length=20)
'CORRELATIONID' => string '605766387f780' (length=13)
'ACK' => string 'Success' (length=7)
'VERSION' => string '106.0' (length=5)
'BUILD' => string '9285531' (length=7)
'CURRENCYCODE' => string 'USD' (length=3)
'AMT' => string '329.00' (length=6)
'ITEMAMT' => string '329.00' (length=6)
'SHIPPINGAMT' => string '0.00' (length=4)
'HANDLINGAMT' => string '0.00' (length=4)
'TAXAMT' => string '0.00' (length=4)
'INSURANCEAMT' => string '0.00' (length=4)
'SHIPDISCAMT' => string '0.00' (length=4)
'L_NAME0' => string 'or2395' (length=6)
'L_QTY0' => string '1' (length=1)
'L_TAXAMT0' => string '0.00' (length=4)
'L_AMT0' => string '329.00' (length=6)
'L_DESC0' => string 'Product name foobar' (length=31)
'L_ITEMWEIGHTVALUE0' => string ' 0.00000' (length=10)
'L_ITEMLENGTHVALUE0' => string ' 0.00000' (length=10)
'L_ITEMWIDTHVALUE0' => string ' 0.00000' (length=10)
'L_ITEMHEIGHTVALUE0' => string ' 0.00000' (length=10)
'PAYMENTREQUEST_0_CURRENCYCODE' => string 'USD' (length=3)
'PAYMENTREQUEST_0_AMT' => string '329.00' (length=6)
'PAYMENTREQUEST_0_ITEMAMT' => string '329.00' (length=6)
'PAYMENTREQUEST_0_SHIPPINGAMT' => string '0.00' (length=4)
'PAYMENTREQUEST_0_HANDLINGAMT' => string '0.00' (length=4)
'PAYMENTREQUEST_0_TAXAMT' => string '0.00' (length=4)
'PAYMENTREQUEST_0_INSURANCEAMT' => string '0.00' (length=4)
'PAYMENTREQUEST_0_SHIPDISCAMT' => string '0.00' (length=4)
'PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED' => string 'false' (length=5)
'PAYMENTREQUEST_0_ADDRESSNORMALIZATIONSTATUS' => string 'None' (length=4)
'L_PAYMENTREQUEST_0_NAME0' => string 'or3333' (length=6)
'L_PAYMENTREQUEST_0_QTY0' => string '1' (length=1)
'L_PAYMENTREQUEST_0_TAXAMT0' => string '0.00' (length=4)
'L_PAYMENTREQUEST_0_AMT0' => string '329.00' (length=6)
'L_PAYMENTREQUEST_0_DESC0' => string 'Product name foobar' (length=31)
'L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE0' => string ' 0.00000' (length=10)
'L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0' => string ' 0.00000' (length=10)
'L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0' => string ' 0.00000' (length=10)
'L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0' => string ' 0.00000' (length=10)
'PAYMENTREQUESTINFO_0_ERRORCODE' => string '0' (length=1)

最佳答案

即使您在 SetExpressCheckout 调用中传递了 IDENTITYACCESSTOKEN,您仍然需要将买家重定向到 PayPal,以便他们可以批准付款。设置 IDENTITYACCESSTOKEN 允许买家跳过登录页面,使他们的流程更快,但他们仍然需要转到 PayPal 以批准付款。调用 SetExpressCheckout 后,将它们重定向到 https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token={token}(其中 {token} 是来自 SetExpressCheckout 响应的 TOKEN 的值。

关于Paypal GetExpressCheckoutDetails 缺少 PAYERID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21195862/

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