View wishlist
Shopping Cart:0Items
Your shopping cart is currently empty.
Discounts:
Total:$0.00
`;notices.html(markup);}var isPayPalEligible = paypal.isFundingEligible('paypal');if(isPayPalEligible) {paypal.Buttons({env: 'production',locale: 'en_US',style: {size: 'small',color: 'gold',shape: 'rect',label: 'paypal',layout: 'vertical'},createOrder: function () {return fetch(`${window.location.origin}/webhooks/paypalcommerce/commerceplatform/createpaypalcommerceorder`, {method: 'post',headers: {'content-type': 'application/json'}}).then(function (response) {return response.json();}).then(function (json) {return json.id;}).catch(function (error) {var itemCount = parseInt($('input#hfItemCount').val());$('#minicart-modal').modal('hide');if(itemCount == 0) {displayMessage('Your shopping cart is empty.');return false;}displayMessage('We are not able to process your payment at this time. Please check your payment information and try again.');console.log(error);})},onApprove: function (json, actions) {return fetch(`${window.location.origin}/webhooks/paypalcommerce/commerceplatform/processpaypalcommerceorder`, {method: 'post',headers: {'content-type': 'application/json'},body: `{'orderId': '${json.orderID}','payPalPaymentType': 'paypal','creditCardData': null}`}).then(function (response) {return response.json();}).then(function (json) {var page = json.page;var returnUrl = encodeURIComponent(window.location.pathname);var redirectUrl = `/${page}?returnUrl=${returnUrl}`;window.location.href = redirectUrl;}).catch(function (error) {$('#minicart-modal').modal('hide');displayMessage('We are not able to process your payment at this time. Please check your payment information and try again.');console.log(error);})}}).render('#paypal-button-container-minicart');}