Is there a way to test automatic sales tax calculation from Sandbox Account?

eavilesmejia
Contributor
Contributor

Hello,

 

I'm following this article https://developer.paypal.com/api/nvp-soap/paypal-payments-standard/admin/checkout-settings/#link-aut... and trying to test Auto-calculate sales tax (domestic and international) from Sandbox Account, but I see the configuration page available only from Production Account (https://developer.paypal.com/api/nvp-soap/paypal-payments-standard/admin/checkout-settings/#link-acc...

 

My understanding is that those Taxes have to be configured manually from the account, but I paste the snippet of my Paypal Buttons just in case I'm missing some Script Configuration or any Create Order fields.

 

paypal.Buttons({
style: {
layout: 'horizontal',
color: 'gold',
shape: 'pill',
size: 'responsive',
label: 'pay',
tagline: false,
height: 45,
},
// Sets up the transaction when a payment button is clicked
createOrder: (data, actions) => {
return actions.order.create({
intent: 'CAPTURE',
purchase_units: [{
soft_descriptor: 'My Store',
amount: {
currency_code: 'USD',
value: '85', // item_total - discount
breakdown: {
discount: {
currency_code: 'USD',
value: '15'
},
item_total: {
currency_code: 'USD',
value: '100'
}
}
},
items: [
{
name: 'Product 1',
quantity: '2',
unit_amount: {
currency_code: 'USD',
value: '25'
}
},
{
name: 'Product 2',
quantity: '2',
unit_amount: {
currency_code: 'USD',
value: '25'
}
},
]
}]
});
},
// Finalize the transaction after payer approval
onApprove: (data, actions) => {
return actions.order.capture().then(function(orderData) {
// Successful capture! For dev/demo purposes:
console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
location.href = './thank_you.html'
});
}
}).render('#paypal-button-container');

I know we can pass the tax field when creating an Order but I would like it to use the automatic option if possible.

 

Thanks in advance!!

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.