wgltony / react-native-braintree-dropin-ui

React Native integration of Braintree Drop-in for IOS & ANDROID (Apple Pay, Google Pay, Paypal, Venmo, Credit Card)
MIT License
78 stars 104 forks source link

"Credit or Debit Cart" option is not showing in android. #52

Closed kishanbharda closed 4 years ago

kishanbharda commented 4 years ago

I have used this library in my react-native app. Here is the code that I have used to call react-native-braintree-dropin-ui :

BraintreeDropIn.show({
  clientToken: brainTreeToken,
  countryCode: "US", //apple pay setting
  currencyCode: "USD", //apple pay setting
  orderTotal: cartAmount.toString(),
  googlePay: false,
  applePay: false,
  vaultManager: true,
  cardDisabled: false,
  darkTheme: true,
})
  .then((result) => {
    // here is an api to handle payment on server
  })
  .catch((error) => {
    if (error.code === "USER_CANCELLATION") {
      // code to handle user cancellation
    } else {
      // code to handle error
    }
  });

It successfully popup the braintree-dropin-ui. But the problem is that in android it only gives option to pay with paypal. It does not displaying "Credit or Debit Cart" option in pop up. However same code displaying both options, Paypal and Credit or Debit Cart in iOS.

Can anyone please help me what's the problem here ?

amplework commented 4 years ago

same issue

mayur2345 commented 4 years ago

Capture

please remove the key cardDisabled from your option it will show because of the commented section it is showing such behaviour

kishanbharda commented 4 years ago

Thanks @mayur2345 it's worked. I removed cardDisabled key from the options and it worked.