react-native-braintree-xplat
react-native-braintree-xplat copied to clipboard
Having trouble making any function call to pass nonce to server after BTClient.getCardNonce()
I am unable to do anything within the BTClient.getCardNonce().then(function(nonce) { the only thing that seems to work is console.log. I have tried a fetch call to pass the nonce but that doesnt even happen. Neither do any calls to functions outside this scope. Am I missing something here? How am I supposed to pass the nonce to the server?
Hi @raziboy939
I was also facing this problem. I manage to get this working by using the following code
BTClient.showPaymentViewController({}).then((nonce) => {
setTimeout(() => {
alert(nonce, 'success')
}, 1000)
})
console.log also only worked for me. For any other code to run you have to delay it