简体   繁体   English

PayPal 付款请求返回 HTTP 400 响应

[英]PayPal payment request returns HTTP 400 response

I try to make payment requesets for different users via https://api.paypal.com/v1/payments/payment , but for some requests, 40%, PayPal api returns HTTP 400 response and for the rest they are fine.我尝试通过https://api.paypal.com/v1/payments/payment为不同的用户进行支付请求,但对于某些请求,40%,PayPal api 返回 HTTP 400 响应,其余的它们都很好。 the body of requests is similar to:请求正文类似于:

{
"intent": "sale",
"payer": {
    "payment_method": "PAYPAL",
    "funding_instruments": [
        {
            "billing": {
                "billing_agreement_id": "B-XXXXX"
            }
        }
    ]
},
"transactions": [
    {
        "amount": {
            "currency": "EUR",
            "details": {
                "subtotal": "11.99",
                "tax": "0.0",
                "shipping": "0.0",
                "handling_fee": "0.0",
                "shipping_discount": "0.0",
                "insurance": "0.0"
            },
            "total": "11.99"
        },
        "invoice_number": "pp_XXXX",
        "custom": "\"{\"payment_id\": \"6102645598795\", \"user_id\": \"28233184743\", \"cid\": \"DE:282331858548:30\"}\""
    }
],
"redirect_urls": {
    "return_url": "https://example.com/return",
    "cancel_url": "https://example.com/cancel"
}
}

and the response is similar to并且响应类似于

{
"name": "TRANSACTION_REFUSED",
"message": "The request was refused",
"information_link": "https://developer.paypal.com/docs/api/payments/#errors",
"debug_id": "8e0a927a12",
"code": "TRANSACTION_REFUSED"
}

the response is not informativ.回复不是信息性的。 any idea?任何的想法?

After contacting PayPal support and sharing the debug_id , They inform me that the error is related to an invalid funding source.在联系 PayPal 支持并分享debug_id ,他们通知我该错误与无效的资金来源有关。 The issue means the funding source, credit card or bank account is deleted.该问题意味着资金来源、信用卡或银行账户被删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM