bamlab / react-native-braintree-payments-drop-in

React Native integration of Braintree Drop-in
MIT License
35 stars 31 forks source link

Question: can I pass the nonce back to the Braintree drop in UI? #24

Closed ShaharyarMaroof closed 4 years ago

ShaharyarMaroof commented 4 years ago

@Minishlink I was wondering if I can pass the nonce back to the drop in ui so that if the user has previously entered any card info, they can go straight to the card info screen rather than selecting a payment method as they do on the first time use?

ShaharyarMaroof commented 4 years ago

Any updates on this?

Minishlink commented 4 years ago

Not sure what you mean?

ShaharyarMaroof commented 4 years ago

@Minishlink, so the first the time the user opens the braintree drop in UI and provides card info to get a nonce token, which is passed to my server. Let's suppose, I open the braintree drop in UI again, this time I want to prepopulate the previously entered card info in the drop in UI. I will have to pass the nonce token back to the library right? Will that be done by passing the nonce token to the clientToken key?

Minishlink commented 4 years ago

As far as I remember, when you call the Braintree Drop-In with the same client token, it will show the registered card if the user already has one. But this can only work if on the server side you save the card on Braintree for this specific customer.

ShaharyarMaroof commented 4 years ago

Okay, will try it out, thanks for the help! (Y)

ShaharyarMaroof commented 4 years ago

It worked by passing in the clientToken I get from my server. thanks!