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

Store last selected payment method #1445

Merged
merged 5 commits into from
Nov 25, 2019

Conversation

yuki-stripe
Copy link
Collaborator

Summary

STPPaymentContext and STPPaymentOptionsViewController pre-select the last selected payment method via a {customer_id: last_selected_payment_method_id} store in NSUserDefaults.

Motivation

https://jira.corp.stripe.com/browse/IOS-1365

Testing

Added a UI test that covers reading, writing a PM id, writing nil, and multiple customers.

@yuki-stripe yuki-stripe merged commit 2b21001 into master Nov 25, 2019
@yuki-stripe yuki-stripe deleted the yuki/save-last-selected-payment-method-v0 branch November 25, 2019 23:59
@dskibin
Copy link

dskibin commented Dec 2, 2019

Thank you for the fix and merge. Could you tell when this will be released?

@Ariandr
Copy link

Ariandr commented Dec 2, 2019

Hi @yuki-stripe
By the way, could you please explain how to trigger this behavior of storing the last selected payment method?
Do we need to set a property or it will be done automatically after this update?

@yuki-stripe
Copy link
Collaborator Author

@dskibin - You can expect a release within the next couple days.

@Ariandr - This will happen automatically.

@Ariandr
Copy link

Ariandr commented Dec 3, 2019

@yuki-stripe Great, thank you for the quick response!

yuki-stripe pushed a commit that referenced this pull request Oct 4, 2022
* Start on error state

* more progress on error state

* dispatch force poll after 3 seconds

* Localize strings

* Remove print statements

* Add spacer view for error view

* use helper function

* Little bit of clean up

* Change to 20 seconds suggested by apac team

* Update copy

* Highlight countdown time

* Update fonts

* Some clean up

* Go back to 5 seconds

* Remove force unwrwap

* Minor refactor

* fix comment

* clean up

* Avoid retain cycle

* finish UI tweaking!

* Fix asset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants