Braintree Javascript SDK v2 OnCancelled not triggered
See original GitHub issueGeneral information
- SDK version: Javascript SDK v 2.32.1
- Environment: Sandbox
- Browser and OS: Chrome on MacOS (10.13.6) High Sierra
Issue description
Hi, We have implemented Braintree Javascript SDK v2 in one of our application, We are using custom setup for paypal, the issue is that when user cancels or close the iframe, we don’t get any callback. We want to perform some specific task on cancellation but onCancelled event is not being fired.
braintree.setup(clientToken, "custom", {
paypal: {
singleUse: true,
intent: "sale",
amount: amount,
currency: "USD",
locale: "en_us",
commit: true,
enableShippingAddress: false,
headless: true
},
onReady: function(integration) {
....
},
onCancelled: function(obj) {
....
},
onPaymentMethodReceived: function(payload) {
....
}
});
Another Attempt
braintree.setup(clientToken, "custom", {
paypal: {
onCancelled: function(obj) {
.......
},
same as above
},
onReady: function(integration) {
....
},
onPaymentMethodReceived: function(payload) {
....
}
});
Nothing seems to work here, any help will be greatly appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
PayPal - Braintree Developer Documentation
The PayPal functionality of Braintree.js accepts a few different options. ... onCancelled, Function ... It is not fired in Drop-in integrations.
Read more >PayPalCheckout - Documentation - Braintree Open Source
Called when the PayPal SDK has been loaded onto the page. The second argument is the PayPal Checkout instance. If no callback is...
Read more >Migrating from checkout.js to the PayPal JS SDK | JavaScript
You are starting a new PayPal web integration. Previously, Braintree documented how to integrate with version 4 of PayPal's JavaScript SDK, called checkout.js....
Read more >Handle the cancel event on paypal client with braintree
Instead of the onCancelled callback function like in v2, in v3 it is in the error handling where you can direct tokenization errors...
Read more >PayPal Payment Integration using Braintree in Ionic 5 apps
Create Braintree sandbox account and get the required keys; Setup Ionic 5 project; Setup Node JS project; Creating Node JS API's for Braintree...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s no planned end date for v2 (in fact, v1 still works), but it currently only receives necessary security updates, which is why I recommend upgrading to version 3 instead.
Also can you please tell me when v2 will be completely gone. Like it won’t work anymore