-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[MBL-1905] Revert "[MBL-1613]" #2207
Conversation
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.
Looks good; just one concern
@@ -456,7 +457,6 @@ public class NoShippingPostCampaignCheckoutViewModel: NoShippingPostCampaignChec | |||
|
|||
let completeCheckoutWithCreditCardInput: Signal<GraphAPI.CompleteOnSessionCheckoutInput, Never> = Signal | |||
.combineLatest(self.confirmPaymentSuccessfulProperty.signal.skipNil(), checkoutId, selectedCard) | |||
.takeWhen(self.confirmPaymentSuccessfulProperty.signal.skipNil()) |
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 think we should still keep this takeWhen
- it's probably not needed since a user shouldn't be able to change the selected card again once we dismiss this vc if checkout fails, but having "change selected card" kick off checkout is not a risk I'd like to take.
.observeValues { [weak self] error in | ||
|
||
#if DEBUG | ||
let serverError = error.errorMessages.first ?? "" |
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.
Nit: Maybe put a default value (Unknown server error
or something) instead of an empty string here, since this is for debugging
📲 What
Reverts #2171
🤔 Why
As our estimated shipping flag has been rolling out, a backer experienced an error when attempting to late pledge with Apple Pay. They were shown an error banner and weren't able to retry their pledge.
This looks to be an error where re-creating a payment intent is failing because some backend state changed.
See original thread between mobile and payments for more context: https://kickstarter.slack.com/archives/C3LS41US0/p1732652825528529
🛠 How
By reverting these changes, the checkout screen will dismiss forcing a new checkout object to be created for the user so that a new payment intent can be created and validated when there is an error like this.
✅ Acceptance criteria
Tested this by manually forcing validate checkout and onCompleteSessionCheckout to fail on Staging. Testing the Apple Pay flow on Prod to verify that is working as expected will be important also.
⏰ TODO