I'm currently using this code to accept payments on my website using PayPal Express Checkout. I removed the shipping fields using the 'NO_SHIPPING' option. Since I'm selling digital goods, I would also like to remove the billing address fields (firstname, lastname, zip, phone, email) or at least any of them. How to do that?
<script src="https://www.paypal.com/sdk/js?client-id={client-id}"></script>
<script>
render_paypal_button();
function render_paypal_button() {
paypal.Buttons({
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: 1.00
}
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
});
}
}).render('#paypal-button-container');
</script>