Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants