Paypal JS SDK Smart Payment - Disable address promt for Creditcard payment without account

前端 未结 2 797
再見小時候
再見小時候 2021-02-19 12:44

I\'m integrating the Smart Payment Buttons in the paypal checkout



        
相关标签:
2条回答
  • 2021-02-19 13:18

    You need to set shipping_preference parameter of the application_context object to 'NO_SHIPPING':

    paypal.Buttons({
      createOrder: function(data, actions) {
        return actions.order.create({
          purchase_units: [{ amount: { value: 99.00 } }],
    
          application_context: {
            shipping_preference: 'NO_SHIPPING'
          }
    
        });
      },
      onApprove: function(data, actions) {}
    }).render(button);
    

    You can read more about Application Context Object

    0 讨论(0)
  • 2021-02-19 13:33

    You need to set shipping_type parameter 'PICKUP':

    paypal.Buttons({
      createOrder: function(data, actions) {
        return actions.order.create({
          shipping_type: 'PICKUP',
          application_context: { shipping_preference: 'NO_SHIPPING' },
          purchase_units: [{ amount: { value: 99.00 } }]
        });
      },
      onApprove: function(data, actions) {}
    }).render(button);
    
    0 讨论(0)
提交回复
热议问题