I am using PayPal Checkout button on my website. It is working fine in chromium or firefox. But is showing error "Error: Detected container element removed from DOM" in 'google chrome' my code is // PayPal Payment
paypal.Buttons({
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
validate_form()
return actions.order.create({
purchase_units: [{
amount: {
value: orderData.total_price()
}
}]
});
},
onApprove: function(data, actions) {
buy()
return actions.order.capture().then(function(details) {
console.log('Transaction completed by ' + details.payer.name.given_name);
// redirect to success page
window.location.replace("/order/payment-successful/");
});
}
}).render('#idPaypalCheckout');
... View more