How to destroy Payal Smart Button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am integrating PayPal SmartButton into our site using SPA.
In the Checkout Page, I create a PayPal button. However, Users can go back to the homepage from here, so the PayPal Smart button's DOM will be lost and SDK will fire "Window closed" exception.
I tried to find in your documents but found no way to destroy created Smart Button.
So is there any way to remove Smart Button without having exceptions?
- Labels:
-
PayPal Here SDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Im having a similar problem in my angular spa. I created a shopping cart interface and after I one initial purchase, every item I add to the cart just automatically goes to payment approved instead of waiting for another payment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ended up just clearing the container HTML. Might be hacky, but works.
e.g using JQuery:
$('#paypal-button-container').html('');

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- use the payment button code with variable price in REST APIs
- Integrating PayPal's smart button into Shopify without specifying the price or shipping rates. in PayPal Payments Standard
- Need help setting up my PayPal smart button for my online shop. in PayPal Payments Standard
- Let user pick their own own subscription pricing and period? in SDKs
- Generated Subscription Buttons show the Error 500 if clicked in Sandbox Environment