Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paymentToken issue #21

Closed
wants to merge 2 commits into from

Conversation

markrickert
Copy link
Contributor

This took me a while to figure out, but it seems that while the native code is returning back the paymentToken if the gateway requires nonce tokenization (in my case: braintree) the javascript just drops the dictionary key when it gets the response back from native code.

This PR makes sure that paymentToken is always passed back in the dictionary (even if it's null) and changes the response from JS to include the key/value so we can use it.

@naoufal
Copy link
Owner

naoufal commented Jan 13, 2018

Resolved in #37.

Releasing soon.

@naoufal naoufal closed this Jan 13, 2018
@naoufal
Copy link
Owner

naoufal commented Jan 13, 2018

@markrickert Thanks for the PR, appreciated! 👋

@markrickert
Copy link
Contributor Author

No problem!

@Andreyco
Copy link
Collaborator

Current version (0.4.0) works well in our production app, hope you are on same boat ;)

@markrickert
Copy link
Contributor Author

Nice @Andreyco, I wound up switching to https://github.com/kraffslol/react-native-braintree-xplat/ for my production needs so I'm not actively using this module anymore. I'm glad that my frustration and work could help others though!

@Andreyco
Copy link
Collaborator

Out of curiosity... So you ended up with direct credit card payments, correct?
We also used that library + this one. We allow to use Apple Pay for those users that are able to use it (mainly US based) and direct CC payments for the rest of them.

I really like the ease of use and the fact that Apple Pay offers all the validation of input data and that's the main driving force I will try to contribute to this lib.

Anyway, I am glad you shipped ;)

@markrickert
Copy link
Contributor Author

We wound up using the braintree dropin UI only. Let braintree handle everything and just get the nonce and send to the server so it can process the order on our behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants