-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feat/add android tap and pay #123
Draft
yelrom0
wants to merge
16
commits into
eventOneHQ:beta
Choose a base branch
from
yelrom0:feat/add-android-tap-and-pay
base: beta
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d66b15f
fix(Android Stripe Terminal): updated SimulatorConfiguration constructor
yelrom0 0f7db98
chore(Gradle): import StripeTerminal core + localmobile
yelrom0 995d452
chore(Build Gradle): update stripe native modules to 2.20.1
yelrom0 e0e3693
fix: Simulator configuration requires new param
yelrom0 a7f9c1c
feat(Stripe Terminal): Plugin method to check tap to pay support
yelrom0 a9e63db
fix(Stripe Terminal Android): Override onStop method to increase stab…
yelrom0 5a671da
chore: Add listener to onStop method
yelrom0 a2937ae
chore(Definitions): add tap to pay supported
yelrom0 dbdf455
chore(Plugin TS): Add js side of tap to pay supported
yelrom0 ec22cc4
fix(StripeTerminal Android): call cancel method on pendingDIscoverRea…
yelrom0 2f8c42d
chore(StripeTerminal Android): onStop override call cancelDIscoverRea…
yelrom0 bab2573
fix(StripeTerminal Android): cancel discover readers before and after…
yelrom0 4c749e9
chore(Web): Add tap-to-pay check in web plugin for terminal
yelrom0 b641c09
fix(Web): use inteface function
yelrom0 9351c90
fix(StripeTerminal): missing semicolon :P
yelrom0 10d9bf4
fix(Stripe Terminal): remove uneccisarry cancel calls
yelrom0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really a fan of this method of determining if Tap to Pay is supported.
This will say that Tap to Pay is not supported if
discoverReaders
is already in progress. It would also preventdiscoverReaders
from happening while it is checking. Both of those could be pretty problematic in an app that auto-connects to readers on startup.I really wish that the Terminal SDK had a built in method... When I implemented this for Tap to Pay on iOS, I just checked the iPhone model and iOS version number to "assume" if it was supported or not. Unfortunately, its not that easy on Android with different phone brands...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, unfortunately this is the official Stripe way of checking.
In this instance I have added a value that is set on first run of the method call, in order to speed up subsequent calls without requiring a call to
discoverReaders
. Although not optimal, scanning for the compatibility/LocalMobileReader is fast (generally less than a second).I have also added a call to cancel
discoverReaders
if it's already running and I have also added a call to thependingDiscoverReaders.cancel()
method withincancelDiscoverReaders
before nullingpendingDiscoverReaders
as Stripe includes calling that method in their docs.If there's anything further that you would like me to change, let me know. I happy to remove this method entirely if it irks you, as it is more a nice to have check rather than a requirement.