react-native-braintree-dropin-ui
react-native-braintree-dropin-ui copied to clipboard
TypeError: null is not an object (evaluating '_reactNativeBraintreeDropinUi.default.show')
Hi
I am implementing BraintreeDropIn package ("react-native-braintree-dropin-ui": "1.1.1")
in my react native project and on testing I am getting this error every time I call .show()
method of BraintreeDropIn
TypeError: null is not an object (evaluating '_reactNativeBraintreeDropinUi.default.show')
Here is my function:
BraintreeDropIn.show({
clientToken: '123',
merchantIdentifier: 'applePayMerchantIdentifier',
countryCode: 'US', //apple pay setting
currencyCode: 'USD', //apple pay setting
merchantName: 'Your Merchant Name for Apple Pay',
orderTotal:'Total Price',
googlePay: true,
applePay: true,
})
.then((result: any) => console.log(result))
.catch((error: any) => {
if (error.code === 'USER_CANCELLATION') {
// update your UI to handle cancellation
} else {
// update your UI to handle other errors
}
});
@NabilaHashmi14 Check the Client Token, it should be coming from your server. check this flow diagram to know how it works. https://developers.braintreepayments.com/start/overview#how-it-works
I'm having this same error, after trying to setup 3D Secure. It was working fine before, and I have a valid clientToken already