Taracque / cordova-plugin-braintree

:credit_card: A Cordova plugin for the Braintree mobile payment processing SDK.
MIT License
27 stars 42 forks source link

Dropin doesn't show and returns userCancelled #81

Open rcpinheiro opened 4 years ago

rcpinheiro commented 4 years ago

Hi! I'm trying this plugin, the server side is working and returning a valid client token but when I open the plugin, a new page appears for a fraction of a second and then the plugin returns userCancelled. Help!

Here's my code:

BraintreePlugin.initialize(token,
function () {
    console.log("init OK!"); // No problem here

    var options = {
        amount: "9.99",
        primaryDescription: "Item"
    };
    BraintreePlugin.presentDropInPaymentUI(options, function (result) {
        if (result.userCancelled) { // Always true
            console.debug("User cancelled payment dialog."); 
        } else { // Never reaches this
            console.info("User completed payment dialog.");
            console.info("Payment Nonce: " + result.nonce);
            console.debug("Payment Result.", result);
        }
    });  
},
function (error) {
    console.error(error);
});
achrafscoorpion22 commented 4 years ago

same here..

faraz9x commented 4 years ago

Same issue, is it because braintree is deprecating old versions. If that's the case then how can we point the plugin to newer versions?

faraz9x commented 4 years ago

same here..

Hi! I'm trying this plugin, the server side is working and returning a valid client token but when I open the plugin, a new page appears for a fraction of a second and then the plugin returns userCancelled. Help!

Here's my code:

BraintreePlugin.initialize(token,
function () {
  console.log("init OK!"); // No problem here

  var options = {
      amount: "9.99",
      primaryDescription: "Item"
  };
  BraintreePlugin.presentDropInPaymentUI(options, function (result) {
      if (result.userCancelled) { // Always true
          console.debug("User cancelled payment dialog."); 
      } else { // Never reaches this
          console.info("User completed payment dialog.");
          console.info("Payment Nonce: " + result.nonce);
          console.debug("Payment Result.", result);
      }
  });  
},
function (error) {
  console.error(error);
});

Did you find any solution to this

rcpinheiro commented 4 years ago

I suggest everyone to use directly Braintree's Dropin UI Javascript. It's not as fast as a plugin but it's simple to use and it's well documented.

PaintedShepherd commented 3 years ago

Can anyone please help me on how to install the JS-Version into my ionic app? Telegram: PaintedShepherd Discord: PaintedShepherd#0810

mavericardo commented 3 years ago

same here..

templatetuners commented 1 year ago

@rcpinheiro I use standard Cordova, is there any other ways/plugins? Getting errors on 3d secure