Error: Detected container element removed from DOM

best_graphics
Contributor
Contributor

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' 

 

Screenshot from 2021-04-05 00-22-12.png

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');

 

 

 

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.