Paypal GetExpressCheckoutDetails缺少PAYERID

时间:2014-01-17 21:05:41

标签: paypal

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

  1. 我们通过OpenID(使用PayPal登录)登录用户并接收访问令牌。
  2. 我们致电SetExpressCheckout,提供IDENTITYACCESSTOKEN
  3. 我们调用GetExpressCheckoutDetails并期望填充PAYERID。它在响应中不存在。
  4. 我不能在没有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)
    

1 个答案:

答案 0 :(得分:0)

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