查看RequestPermissions API,它说范围应该是一个字符串。但是,我一直未能找到如何指定多个范围(特别是 EXPRESS_CHECKOUT 和 REFUND)。逗号分隔、分号,甚至使用他们的 NVP 列表语法都不起作用。CURL 示例将不胜感激。
逗号分隔的示例...
curl -s --insecure -H
"X-PAYPAL-SECURITY-USERID: API_USERNAME"
-H "X-PAYPAL-SECURITY-PASSWORD: API_PASSWORD"
-H "X-PAYPAL-SECURITY-SIGNATURE: API_SIGNATURE"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T"
https://svcs.sandbox.paypal.com/Permissions/RequestPermissions -d
"requestEnvelope.errorLanguage=en_US&scope=EXPRESS_CHECKOUT,REFUND&callback=http://my/callback"
当我提出该请求时,我返回“无效的请求参数范围,值为 EXPRESS_CHECKOUT,REFUND”