贝宝找出使用哪种付款方式

时间:2019-03-12 23:52:08

标签: paypal paypal-rest-sdk

我在UI和SDK 2.0.0-beta中使用paypal的checkout.js作为后端。

我想了解客户使用的是借记卡还是信用卡,更具体地说是使用了哪种信用卡(签证,主卡等)。

如果可以通过checkout.js完成,我应该通过

如果可以从后端完成,我可以在哪里获取该值?

checkout.js:

paypal.Button.render({
env: 'sandbox', // Or 'production',
style: {
    size: 'medium',
    height: 48,
    color: 'silver',
    shape: 'rect',
    label: 'checkout',
    tagline: 'true',
    fundingicons: 'true',
    layout: 'horizontal'
},      
// Set up the payment:
// 1. Add a payment callback
payment: function (data, actions) {
    // 2. Make a request to server
    return actions.request.post('/api/RewardsManagerAPI/create-payment/')
        .then(function (res) {
            ....
        }
      }

使用PayPal SDK 2.0.0-beta的后端:

var payment = new Payment()
        {
            ExperienceProfileId = experienceProfileId,
            Intent = "sale",
            Payer = new Payer()
            {
                PaymentMethod = ?,
            },

0 个答案:

没有答案