gpt4 book ai didi

curl - 来自沙箱的 PayPal 权限服务 -> RequestPermissions CURL 示例返回错误 500000 响应

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

我曾经使用本指南尝试 PayPal 权限服务:https://developer.paypal.com/docs/classic/permissions-service/gs_PermissionsService/#call因此,根据指南,我从示例中执行了以下 CURL 命令:

    curl https://svcs.sandbox.paypal.com/Permissions/RequestPermissions \
-s \
--insecure \
-H "X-PAYPAL-SECURITY-USERID: caller_1312486258_biz_api1.gmail.com" \
-H "X-PAYPAL-SECURITY-PASSWORD: 1312486294" \
-H "X-PAYPAL-SECURITY-SIGNATURE: AbtI7HV1xB428VygBUcIhARzxch4AL65.T18CTeylixNNxDZUu0iO87e" \
-H "X-PAYPAL-REQUEST-DATA-FORMAT: JSON" \
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: JSON" \
-H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" \
-d '{
"scope":"EXPRESS_CHECKOUT", \
"callback":"http://www.example.com/success.html", \
"requestEnvelope": { \
"errorLanguage":"en_US" \
}}'

执行后,我收到以下响应:

{"responseEnvelope":{"timestamp":"2016-03-25T02:50:04.278-07:00","ack":"Failure","correlationId":"591d6ec4ce914","build":"2210301"},"error":[{"errorId":"500000","domain":"PLATFORM","subdomain":"Application","severity":"Error","category":"Application","message":"Internal Error"}]}

这让我很困惑。自然地,我使用自己的沙箱凭据对其进行了尝试。如果我正在更改 USER_ID 或 PASSWORD 字段,我会收到“未经授权”的错误,但是当我用错误的值替换 SIGNATURE 字段时,响应保持不变。但是,我的签名是正确的,它可以与我的 ExpressCheckout 沙盒应用程序一起正常工作。

我有什么想法可能是错的,还是 PayPal 的问题?我应该怎么做才能使此功能适用于我的情况?

谢谢。

最佳答案

像魅力一样工作

curl https://svcs.sandbox.paypal.com/Permissions/RequestPermissions \
-s \
--insecure \
-H "X-PAYPAL-SECURITY-USERID: caller_1312486258_biz_api1.gmail.com" \
-H "X-PAYPAL-SECURITY-PASSWORD: 1312486294" \
-H "X-PAYPAL-SECURITY-SIGNATURE: AbtI7HV1xB428VygBUcIhARzxch4AL65.T18CTeylixNNxDZUu0iO87e" \
-H "X-PAYPAL-REQUEST-DATA-FORMAT: JSON" \
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: JSON" \
-H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" \
-d '{"scope":"EXPRESS_CHECKOUT","callback":"http://www.example.com/success.html", "requestEnvelope": { "errorLanguage":"en_US" }}'

关于curl - 来自沙箱的 PayPal 权限服务 -> RequestPermissions CURL 示例返回错误 500000 响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36218152/

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