Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

<script src="https://www.paypal.com/sdk/js?...>
paypal.Buttons({
createOrder(data, actions) {
// ...
onApprove(data, actions) {
// ...
}).render('#paypal-button');

Besides paying with a PayPal account we want to offer the User to pay for our digital products with SEPA or Credit Card without creating a paypal account.

What we don't require is a billing address or shipping address input from the user. We already have that information and handle billing ourselves, while shipping is not applicable.

Is there any way to disable the address input (and preferable also contact information input) using the JS SDK? Any parameter I can pass to the SDK resource or the paypal.Buttons.render() method? When paying with a Credit Card through other payment providers they never care for that user information. Just the Number, Expiration and CVS should matter for a good UX. Even entering a CC number can already be quite a pain. The same applies to payment with SEPA. I just don't want the user to have to enter their address.

Or do I have to pass the customer information to PayPal to help with fraud prevention? If so, can I at least disable the "Ship to billing address" checkbox? That might confuse our Users.

Thanks!

like image 913
Pete Avatar asked Apr 11 '19 11:04

Pete


People also ask

How do I turn off shipping addresses in PayPal?

Unfortunately it is currently not possible to disable shipping address from PayPal payment page. I would suggest you to please contact PayPal support and ask them to enable your PayPal account for digital goods. That should most likely solve your problem.

Is billing address needed for PayPal?

Yes, you are required to provide billing address if you want to accept all types of credit card. Just FYI, you also need to display PayPal Express Button if you use PayPal Direct.

How do I turn off PayPal smart button?

Unfortunately, there is no way to remove the PayPal button from the smart buttons checkout as that is a core requirement of the smart buttons checkout.

What is PayPal JavaScript SDK?

The JavaScript SDK displays PayPal-supported payment methods on your page to give your buyers a personalized and streamlined checkout experience. You can use the JavaScript SDK to render buttons , payment method icons ( marks ), and credit and debit card form fields ( hosted-fields ).


1 Answers

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

like image 183
Tamik Soziev Avatar answered Nov 09 '22 01:11

Tamik Soziev