- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We sell digital goods (as a service) on our site, and we are using the PayPal smart buttons (which utilizes the Orders API).
When going through the checkout process, and the buyer selects "Debit or Credit Card", it has a checkbox of "Ship to Billing Address". Since we are selling digital goods, we do not want a billing address to be required by our customers.
I have looked into setting the "application_context" or "order_application_context" attributes, setting the "shipping_preference" to NO_SHIPPING. However, this does not seem to affect anything in the sandbox or live version. Any guidance is appreciated!
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here ya go, hope this helps
Mind you I use JQuery so fix accordingly:
// Render the PayPal button into #paypal-button-container
// by David . Nugent - Using PayPal REST V2 API Last update: 05/27/2020
paypal.Buttons({
style: {
layout: 'horizontal',
color: 'gold',
shape: 'pill',
label: 'checkout',
size: 'responsive',
tagline: 'true',
},
// Set up the transaction
createOrder: function(data, actions) {
$('#paypalmsg').hide();
$('#transmsg').show();
$('#transmsg').html('<b>'+'WAITING ON AUTHORIZATION...'+'</b>');
$('#chkoutmsg').hide()
return actions.order.create({
purchase_units: [{
description: 'GnG Order',
amount: {
value: cartTotal
}
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
});
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here ya go, hope this helps
Mind you I use JQuery so fix accordingly:
// Render the PayPal button into #paypal-button-container
// by David . Nugent - Using PayPal REST V2 API Last update: 05/27/2020
paypal.Buttons({
style: {
layout: 'horizontal',
color: 'gold',
shape: 'pill',
label: 'checkout',
size: 'responsive',
tagline: 'true',
},
// Set up the transaction
createOrder: function(data, actions) {
$('#paypalmsg').hide();
$('#transmsg').show();
$('#transmsg').html('<b>'+'WAITING ON AUTHORIZATION...'+'</b>');
$('#chkoutmsg').hide()
return actions.order.create({
purchase_units: [{
description: 'GnG Order',
amount: {
value: cartTotal
}
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
});
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It turns out I had the application_context in the wrong position object. Thanks for your response!
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Customising Paypal Checkout Button in PayPal Payments Standard
- Change the button from Sandbox to Production in REST APIs
- User is asked for shipping address when creating a credit card order in REST APIs
- Show all billing address fields when hiding shipping address fields in PayPal Payments Standard
- Paypal Pay button generates GENERIC_ERROR in PayPal Payments Standard