如何在 API PayPal 的订单捕获响应中获取 payment_source?

How i can get the payment_source in the order capture response of API PayPal?

我正在使用 PayPal API 创建和获取付款订单。我想知道拍下订单后是否可以获取卡数据、支付方式和持卡人姓名?到目前为止,我只得到 return 付款金额、描述和参考 ID,但根据 API 它也应该 return 一个名为 payment_source 的对象,它我看不到。

我将粘贴我得到的回复:

{
    "id": "2LN68665F4466933X",
    "intent": "CAPTURE",
    "status": "COMPLETED",
    "purchase_units": [
        {
            "reference_id": "123456",
            "amount": {
                "currency_code": "MXN",
                "value": "1.00"
            },
            "payee": {
                "email_address": "business@certuscompany.com",
                "merchant_id": "ACGFSQTV9DKWN",
                "display_data": {
                    "brand_name": "ONLINE STORE"
                }
            },
            "description": "Studies Payment",
            "soft_descriptor": "PAYPAL *TEST STORE",
            "payments": {
                "captures": [
                    {
                        "id": "2K6883372G5768117",
                        "status": "COMPLETED",
                        "amount": {
                            "currency_code": "MXN",
                            "value": "1.00"
                        },
                        "final_capture": true,
                        "seller_protection": {
                            "status": "ELIGIBLE",
                            "dispute_categories": [
                                "ITEM_NOT_RECEIVED",
                                "UNAUTHORIZED_TRANSACTION"
                            ]
                        },
                        "seller_receivable_breakdown": {
                            "gross_amount": {
                                "currency_code": "MXN",
                                "value": "1.00"
                            },
                            "paypal_fee": {
                                "currency_code": "MXN",
                                "value": "1.00"
                            },
                            "net_amount": {
                                "currency_code": "MXN",
                                "value": "0.00"
                            }
                        },
                        "links": [
                            {
                                "href": "https://api.sandbox.paypal.com/v2/payments/captures/2K6883372G5768117",
                                "rel": "self",
                                "method": "GET"
                            },
                            {
                                "href": "https://api.sandbox.paypal.com/v2/payments/captures/2K6883372G5768117/refund",
                                "rel": "refund",
                                "method": "POST"
                            },
                            {
                                "href": "https://api.sandbox.paypal.com/v2/checkout/orders/2LN68665F4466933X",
                                "rel": "up",
                                "method": "GET"
                            }
                        ],
                        "create_time": "2022-01-21T18:30:53Z",
                        "update_time": "2022-01-21T18:30:53Z"
                    }
                ]
            }
        }
    ],
    "payer": {
        "name": {
            "given_name": "John",
            "surname": "Doe"
        },
        "email_address": "personal@certuscompany.com",
        "payer_id": "DW9FW6ALYZ6EG",
        "address": {
            "country_code": "MX"
        }
    },
    "create_time": "2022-01-21T18:29:37Z",
    "update_time": "2022-01-21T18:30:53Z",
    "links": [
        {
            "href": "https://api.sandbox.paypal.com/v2/checkout/orders/2LN68665F4466933X",
            "rel": "self",
            "method": "GET"
        }
    ]
}

提前致谢。

不,正常的 PayPal Checkout 是不可能的。客户账单信息(例如,他们是使用卡还是其他资金来源支付)在设计上是保密的。

付款来源信息仅在与 Advanced custom card fields 集成时存在,这是一个 add-on 托管字段集成,需要申请启用它并进行额外开发以在常规 PayPal 下方显示备用托管字段结帐按钮。