如何获取PayPal接口的订单捕获响应中的Payment_SOURCE? [英] How i can get the payment_source in the order capture response of API PayPal?

查看:0
本文介绍了如何获取PayPal接口的订单捕获响应中的Payment_SOURCE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PayPal API创建和捕获付款订单。我想知道在捕获订单后是否可以获得卡数据、支付方式和持卡人的姓名?到目前为止,我只让它返回付款金额、它的描述和它的引用ID,但根据API,它还应该返回一个名为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"
        }
    ]
}

提前谢谢。

推荐答案

否,无法进行正常的贝宝结账。客户帐单信息(例如,他们是用信用卡还是其他资金来源支付)在设计上是保密的。

付款来源信息仅在与Advanced custom card fields集成时存在,Advanced custom card fields是一个附加托管字段集成,需要应用以启用它,并需要进行其他开发才能在常规PayPal按钮下方显示备用托管字段结账。

这篇关于如何获取PayPal接口的订单捕获响应中的Payment_SOURCE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆