Отсутствует ответ Paypal API v2-API seller_receivable_breakdown - PullRequest
1 голос
/ 08 мая 2020

Как мне найти поле seller_receivable_breakdown в API Paypal v2?

Когда я фиксирую платеж, я не получаю 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": "sb-vnmn01690912@personal.example.com",
    "name": {
        "given_name": "John",
        "surname": "Doe"
    },
    "payer_id": "ZMVMLDB2Q3RNS"
},
"purchase_units": [
    {
        "amount": {
            "currency_code": "USD",
            "value": "76.00"
        },
        "payee": {
            "email_address": "sb-dtlz4548886@business.example.com",
            "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"
}

1 Ответ

0 голосов
/ 09 мая 2020

Либо его может не быть в режиме песочницы, либо вам может потребоваться выполнить операцию получения для идентификатора захвата.

https://developer.paypal.com/docs/api/payments/v2/#captures_get

...