Closed serialbandicoot closed 6 years ago
the same issue :(
Any chance someone can suggest an idea to resolve this issue @dungnguyen10989 and I've got?
@dungnguyen10989 - I managed to get it working using package.json of:
"react": "16.0.0-alpha.6",
"react-native": "0.44.3",
"react-native-braintree-xplat": "^4.0.0"
My suggestion is to use the example provided, however I needed to run react-native upgrade on it and fix an issue with a linking error in Xcode.
After setting up the braintree sandbox account, you can replace the merchant_id, public_key, private_key in the ruby server below. Should help get you on your way! If ruby isn't your thing, there was plenty of other options!
I'm going to try and upgrade the react version further to see where it went wrong. I'll post if I get some results.
This was also the iOS(js) file..
Good luck!
@serialbandicoot, thank you for your suggestion, i'll try now
I'm sure Im making a really obvious mistake, so can someone please point me in the right direction.
componentDidMount() { var BTClient = require('react-native-braintree-xplat'); BTClient.setup('eyj2...'); }
I get the following error, I also checked the linking and it seems ok. However I get the following error.
Possible Unhandled Promise Rejection (id: 0): TypeError: Cannot read property 'setup' of undefined
react-native: 0.52.0