react-native-braintree-card icon indicating copy to clipboard operation
react-native-braintree-card copied to clipboard

undefined is not an object (evaluating 'RNBraintreeCard.initWithAuthorization)

Open kashifaliquazi opened this issue 7 years ago • 2 comments

Trying to implement this with android.

on initialization 'BraintreeCardClient.initWithAuthorization()' It throws this error "undefined is not an object (evaluating 'RNBraintreeCard.initWithAuthorization)"

on inspection I found var RNBraintreeCard = require('react-native').NativeModules.RNBraintreeCard; here in index.js on this line var RNBraintreeCard = require('react-native').NativeModules.RNBraintreeCard;

RNBraintreeCard is undefined. i.e. is not available in NativeModules of react-native.

How to fix this can anyone help?

kashifaliquazi avatar Apr 24 '17 09:04 kashifaliquazi

thanks @kashifaliquazi but yeah I have not tested with Android so I am not supporting it.

try this package: https://github.com/kraffslol/react-native-braintree-xplat

it implements the same card nonce method https://github.com/kraffslol/react-native-braintree-xplat#custom-integration

ferndopolis avatar Apr 24 '17 14:04 ferndopolis

Mind putting this in the Documentation? Preferably somewhere high?

mienaikoe avatar Jul 12 '17 14:07 mienaikoe