task: use supported schemes for Apple Pay#22
Merged
luca-gr4vy merged 2 commits intomainfrom Mar 26, 2025
Merged
Conversation
luca-gr4vy
commented
Mar 26, 2025
Comment on lines
+180
to
+194
| let networksMap: [String: PKPaymentNetwork] = [ | ||
| "amex": .amex, | ||
| "cartesbancaires": .cartesBancaires, | ||
| "discover": .discover, | ||
| "eftpos": .eftpos, | ||
| "electron": .electron, | ||
| "elo": .elo, | ||
| "interac": .interac, | ||
| "jcb": .JCB, | ||
| "mada": .mada, | ||
| "maestro": .maestro, | ||
| "mastercard": .masterCard, | ||
| "privatelabel": .privateLabel, | ||
| "visa": .visa, | ||
| "vpay": .vPay |
Contributor
Author
There was a problem hiding this comment.
Create a map so it's easier to reference and update networks
luca-gr4vy
commented
Mar 26, 2025
| "vpay": .vPay | ||
| ] | ||
|
|
||
| guard deviceSupportsApplePay(paymentNetworks: paymentNetworks) else { |
Contributor
Author
There was a problem hiding this comment.
This guard completely prevented the payment sheet to open. Since in this case it checked for supported networks, we're ok to let it open and display the Apple UI error instead for unsupported networks instead.
JohnnyDevi
pushed a commit
to JohnnyDevi/gr4vy-ios
that referenced
this pull request
Apr 3, 2025
* commit 'df62515018bf0bb23883e9edb572d836c8118155': task: use supported schemes for Apple Pay (gr4vy#22) chore(country-items): Update cart item model to include seller country [TA-10180] (gr4vy#21) bump version (gr4vy#19) chore: add the preselect store option to readme (gr4vy#18) bump version (gr4vy#17) refactor: add preferAuthorize intent to the README (gr4vy#16)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description: Makes the SDK use the value of
supported_schemesfromcore-apiinstead of allowing all the networks for Apple Pay (hardcoded that way atm).Ticket: https://gr4vy.atlassian.net/browse/TA-10631
Fixes support issue: https://gr4vy.atlassian.net/browse/TA-10618
Open sheet with no supported cards
ScreenRecording_03-26-2025.13-22-40_1.MP4
Open sheet with one supported Visa card
ScreenRecording_03-26-2025.13-25-53_1.MP4