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

Having trouble making any function call to pass nonce to server after BTClient.getCardNonce()

Open raziboy939 opened this issue 7 years ago • 1 comments

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?

raziboy939 avatar Apr 04 '17 23:04 raziboy939

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

gitsebs avatar Aug 29 '17 11:08 gitsebs