-
Notifications
You must be signed in to change notification settings - Fork 995
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
read from customersession setting instead of config #4517
Open
joyceqin-stripe
wants to merge
22
commits into
master
Choose a base branch
from
joyceqin/MOBILESDK-2666
base: master
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.
+932
−537
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
a149588
read from customersession setting instead of config
joyceqin-stripe 4660d4f
changed naming to better match others
joyceqin-stripe 2057cb2
merged with master
joyceqin-stripe cf5fd54
elementssession test
joyceqin-stripe b6cfbe9
remove canUpdateCardBrand (removed in master)
joyceqin-stripe cb9d01d
fix build
joyceqin-stripe 907a363
fix test
joyceqin-stripe 08087f6
merge with main
joyceqin-stripe 9aa6307
fixing build
joyceqin-stripe 23358dd
replace payment_method_set_as_default with payment_method_sync_defaul…
joyceqin-stripe 782ffec
Merge branch 'master' into joyceqin/MOBILESDK-2666
joyceqin-stripe d43d73e
Merge branch 'master' into joyceqin/MOBILESDK-2666
joyceqin-stripe 68ae80e
remove @testable import from STPTestingAPIClient
joyceqin-stripe 56b7ff8
Merge branch 'master' into joyceqin/MOBILESDK-2666
joyceqin-stripe 9c268e7
read from elementsSession in makeViewModels instead of passing it in
joyceqin-stripe ac0fdf1
Merge branch 'joyceqin/MOBILESDK-2666' of github.com:stripe/stripe-io…
joyceqin-stripe 3aef64e
mock network for tests with updated ci test backend
joyceqin-stripe ea32e91
revert timeout
joyceqin-stripe 2fc6c05
do not show apple pay in customersheet when adding first saved pm
joyceqin-stripe 4f2f131
Merge branch 'master' into joyceqin/MOBILESDK-2666
joyceqin-stripe 1480972
cleanup
joyceqin-stripe f88219a
Merge branch 'joyceqin/MOBILESDK-2666' of github.com:stripe/stripe-io…
joyceqin-stripe 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,10 +107,10 @@ extension CustomerSessionAdapter { | |
return stripePaymentMethodId | ||
} | ||
|
||
func fetchSelectedPaymentOption(for customerId: String, customer: ElementsCustomer? = nil) -> CustomerPaymentOption? { | ||
func fetchSelectedPaymentOption(for customerId: String, elementsSession: STPElementsSession? = nil) -> CustomerPaymentOption? { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly surprised we don't have tests for this, can you mention this class in the JIRA ticket you create. |
||
// if opted in to the "set as default" feature, try to get default payment method from elements session | ||
if configuration.allowsSetAsDefaultPM { | ||
guard let customer = customer, | ||
if let elementsSession = elementsSession, elementsSession.paymentMethodSyncDefaultForCustomerSheet { | ||
guard let customer = elementsSession.customer, | ||
let defaultPaymentMethod = customer.getDefaultOrFirstPaymentMethod() else { return nil } | ||
return CustomerPaymentOption.stripeId(defaultPaymentMethod.stripeId) | ||
} | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
Surprised we don't have any tests for this class? If so can we file a run ticket to get some tests created for this class.