Reputation: 30805
Is there any option, when creating a payment with Paypal API, that allows to remove a "Ship to" section from Checkout popup? I mean just not to displayit in popup.
I do not use a shipping_address
option anywhere in payment_json
object when creating a configuration for a payment. But the section still persists.
Upvotes: 3
Views: 1259
Reputation: 1761
I'm adding this answer since I came here while searching for disabling the shipping to information by using PayPal Smart Payment Button. This answer may help them.
You have to add the below line to remove Ship to address.
application_context: { shipping_preference: 'NO_SHIPPING' }
Eg:
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{ amount: { value: 1.00 } }],
application_context: { shipping_preference: 'NO_SHIPPING' }
});
}
}).render("#paypal-button-container");
Upvotes: 5
Reputation: 1095
You need to use Payment Experience API.
Create new web_profile, and set presentation with
"no_shipping": 1,
"address_override": 0
Upvotes: 2