贝宝智能按钮信用卡填充或隐藏电话号码

问题描述

我允许使用Paypal智能按钮进行信用卡付款。这是我的createOrder的样子:

createOrder: function(data,actions) {
    paypalActions = actions;
    return fetch('/basket/get/lineitems',{
            method: 'get'
        }).then(function(res) {
            return res.json();
        }).then(function(orderData) {
            orderDataArray = [orderData]
            return actions.order.create({
                payer: {
                    name: {
                    given_name: "PayPal",surname: "Customer"
                    },address: {
                    address_line_1: '123 ABC Street',address_line_2: 'Apt 2',admin_area_2: 'San Jose',admin_area_1: 'CA',postal_code: '95121',country_code: 'US'
                    },email_address: "[email protected]",phone: {
                    phone_type: "MOBILE",phone_number: {
                        national_number: "12345678"
                    }
                    }
                },purchase_units: orderDataArray,shipping_type: 'PICKUP',application_context: { shipping_preference: 'NO_SHIPPING' }
            })
        });

},

(获取请求会获取我的卡片项目。)

下面是文档:https://developer.paypal.com/docs/checkout/integration-features/standard-card-fields/#optimize-the-card-fields,可以很好地传递我已经拥有的帐单地址。只有电话号码没有填写。

enter image description here

用上面的示例填写电话字段需要什么?甚至可以将其设置为不需要吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)