无法转换货币Paypal Pay API错误

时间:2018-11-06 05:12:51

标签: api paypal payment currency sandbox

我正在使用Paypal自适应支付API。

  

https://svcs.sandbox.paypal.com/AdaptivePayments/Pay

请求有效载荷

{
"actionType":"PAY",
"memo":"Example",
"preapprovalKey":"PA-4PV844316B104562R",
"receiverList":{"receiver":{"amount":"14.00","email":"reveiver.email@gmail.com"}},
"currencyCode":"CHF",
"requestEnvelope":{"errorLanguage":"en_US"},
"pinType":"NOT_REQUIRED",
"feesPayer": "SENDER",
"senderEmail":"sender.email@gmail.com",
"returnUrl":"http://www.google.com/?paypal=ok",
"cancelUrl":"http://www.google.com/paypal=cancel",
"clientDetails": {
    "applicationId": "APP-80W284485P789543T"
}
}

获得答复

    {
    "responseEnvelope": {
        "timestamp": "2018-11-05T20:45:14.602-08:00",
        "ack": "Failure",
        "correlationId": "1609b946b9c72",
        "build": "50069244"
    },
    "error": [
        {
            "errorId": "520002",
            "domain": "PLATFORM",
            "subdomain": "Application",
            "severity": "Error",
            "category": "Application",
            "message": "Internal Error",
            "parameter": [
                "Unable to convert currency"
            ]
        }
    ]
}

如果我发送currencyCode:“ USD”,那么它可以正常工作,但是当我传递currencyCode:“ CHF”时,它给出了响应错误。我所有的沙盒帐户货币都是CHF。直到10月26日,它都可以正常工作,但是当我在11月3日检查时突然出现错误。

1 个答案:

答案 0 :(得分:0)

根据我的调试,当接收方不止一个,货币不是USD且reverseAllParallelPaymentsOnError设置为true时,就会发生这种情况。

reverseAllParallelPaymentsOnError设置为false时,事务正在进行。

虽然不是解决方案,但我仍在寻找其他解决方案。