Paypal API v2-API响应缺少seller_receivable_breakdown。

问题描述 投票:1回答:1

我如何从Paypal v2 API中找到seller_receivable_breakdown字段?

当我捕捉到付款时,我没有得到一个 seller_receivable_breakdown 回传到API响应中,其中应该包含了 net_amount.

有什么原因吗?

API回复。

{
"create_time": "2020-05-08T18:06:08Z",
"id": "35W12417YE077383Y",
"intent": "CAPTURE",
"links": [
    {
        "href": "https://api.sandbox.paypal.com/v2/checkout/orders/35W12417YE077383Y",
        "method": "GET",
        "rel": "self",
        "title": "GET"
    }
],
"payer": {
    "address": {
        "country_code": "SG"
    },
    "email_address": "[email protected]",
    "name": {
        "given_name": "John",
        "surname": "Doe"
    },
    "payer_id": "ZMVMLDB2Q3RNS"
},
"purchase_units": [
    {
        "amount": {
            "currency_code": "USD",
            "value": "76.00"
        },
        "payee": {
            "email_address": "[email protected]",
            "merchant_id": "9D3W7QWY9MULE"
        },
        "payments": {
            "captures": [
                {
                    "amount": {
                        "currency_code": "USD",
                        "value": "76.00"
                    },
                    "create_time": "2020-05-08T18:06:37Z",
                    "final_capture": true,
                    "id": "1DU784512L090023U",
                    "links": [
                        {
                            "href": "https://api.sandbox.paypal.com/v2/payments/captures/1DU784512L090023U",
                            "method": "GET",
                            "rel": "self",
                            "title": "GET"
                        },
                        {
                            "href": "https://api.sandbox.paypal.com/v2/payments/captures/1DU784512L090023U/refund",
                            "method": "POST",
                            "rel": "refund",
                            "title": "POST"
                        },
                        {
                            "href": "https://api.sandbox.paypal.com/v2/checkout/orders/35W12417YE077383Y",
                            "method": "GET",
                            "rel": "up",
                            "title": "GET"
                        }
                    ],
                    "seller_protection": {
                        "dispute_categories": [
                            "ITEM_NOT_RECEIVED",
                            "UNAUTHORIZED_TRANSACTION"
                        ],
                        "status": "ELIGIBLE"
                    },
                    "status": "COMPLETED",
                    "update_time": "2020-05-08T18:06:37Z"
                }
            ]
        },
        "reference_id": "default",
        "shipping": {
            "address": {
                "address_line_1": "123 Thomson Rd.",
                "admin_area_1": "SG_zip = 308123",
                "admin_area_2": "Singapore",
                "country_code": "SG",
                "postal_code": "308123"
            },
            "name": {
                "full_name": "Doe John"
            }
        }
    }
],
"status": "COMPLETED",
"update_time": "2020-05-08T18:06:37Z"
}
paypal paypal-rest-sdk
1个回答
0
投票

要不就是在沙盒模式下没有,要不就是你需要对捕捉到的id进行一个get操作。

https:/developer.paypal.comdocsapipaymentsv2#captures_get。

© www.soinside.com 2019 - 2024. All rights reserved.