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

Feature: add native getDeviceData method #37

Merged
merged 4 commits into from Oct 6, 2023
Merged

Feature: add native getDeviceData method #37

merged 4 commits into from Oct 6, 2023

Conversation

audrius-sav
Copy link
Contributor

@audrius-sav audrius-sav commented Oct 5, 2023

There was no way to get device data from BrainTree without calling native payment flow methods like showPaypalModule() or tokenizeCard(). Device data should be sent to your server when user has already vaulted his PayPal account (https://developer.paypal.com/braintree/docs/guides/paypal/vault/android/v4#collecting-device-data).
Changes:

  • Added native getDeviceData methods to only call Data Collector and resolve promise with the result.

@audrius-sav
Copy link
Contributor Author

@vasylnahuliak
Some changes, pls review when you can 🙏
Слава Україні! 🇺🇦

@vasylnahuliak
Copy link
Collaborator

Taken for testing

@vasylnahuliak
Copy link
Collaborator

It works.
Thanks!

@vasylnahuliak vasylnahuliak merged commit 4d81534 into ekreative:master Oct 6, 2023
@vasylnahuliak
Copy link
Collaborator

🎉 Released in v2.3.0 https://github.com/ekreative/react-native-braintree/releases/tag/v2.3.0

@vasylnahuliak vasylnahuliak self-requested a review October 6, 2023 06:33
@vasylnahuliak vasylnahuliak added the enhancement New feature or request label Oct 6, 2023
@paskalov-aris
Copy link

paskalov-aris commented Oct 9, 2023

To-Do:

  • Android. Check if we can split the logic in the getDeviceData method to call new DataCollector(mBraintreeClient).collectDeviceData() only once (it seems like it's currently may be called a second time from the setup method)
  • iOS. Try to use the new getDeviceData method in other methods, such as tokenizeCard, showPayPalModule

vasylnahuliak added a commit that referenced this pull request Oct 9, 2023
@vasylnahuliak
Copy link
Collaborator

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

Successfully merging this pull request may close these issues.

None yet

3 participants