<div id="paypal-express-cart-payments"></div> <script> paypal.Buttons({ style: { label: 'checkout', tagline: false, size: 'responsive', height:55, layout: 'horizontal', }, commit: true, env: 'production', onClick: () => {}, createOrder: async function() { LoadingMask(true); return fetch('/modules/paypal/api/?mod=order-create&express_checkout=cart', { method: 'post', body: '', headers: { 'content-type': 'application/json' } }).then(function(res) { return res.json(); }).then(function(data) { return data.id; }).finally(function() { LoadingMask(false); }); }, onApprove: function(data, actions) { LoadingMask(true); return actions.order.get().then(function(orderDetails) { return fetch( '/modules/paypal/api/?mod=expresscart-callback&express_checkout=cart&token=' + orderDetails.id, { method: 'GET', headers: { 'content-type': 'application/json' } }).then(function(res) { return res.json(); }).then(function(data) { if (data.redirect) { setTimeout(function() { LoadingMask(true); }, 100); window.location.href = data.redirect; } else { // Handle error case when no redirect URL is returned console.error('No redirect URL received'); sweetAlert("Oops...", "Network error, please try again", "error"); } }).catch(function(error) { // Handle any fetch or processing errors console.error('Error processing payment:', error); LoadingMask(false); }).finally(function() { LoadingMask(false); }); }) }, onCancel: function(data) { console.log(data); }, onError: function(err) { console.log(err); } }).render('#paypal-express-cart-payments'); </script>

SIGN IN

Register Account

By creating an account you will be able to shop faster, be up to date on an order's status, and keep track of the orders you have previously made.