Hi everyone, I am using the new paypal button, I like to have free shipping to Belgium and flat rate in Europe, but no delivery outside Europe. I have this script from the paypal guide: I don't know how to replace the data.shipping_address.state === 'CA' ? for Belgium. Thank you const baseOrderAmount = '15.00'; paypal.Buttons({ onShippingChange: function(data, actions) { // Patch the shipping amount const shippingAmount = data.shipping_address.country === 'CA' ? '0.00' : '5.00'; return actions.order.patch([ { op: 'replace', path: '/purchase_units/@reference_id==\'default\'/amount', value: { currency_code: 'EUR', value: (parseFloat(baseOrderAmount) + parseFloat(shippingAmount)).toFixed(2), breakdown: { item_total: { currency_code: 'EUR', value: baseOrderAmount }, shipping: { currency_code: 'EUR', value: shippingAmount } } } } ]); } }).render('#paypal-button-container');
... View more