-
Notifications
You must be signed in to change notification settings - Fork 664
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
Add Error to FormActivityUI #10127
Add Error to FormActivityUI #10127
Conversation
Diffuse output:
APK
|
d93218d
to
9262a81
Compare
) | ||
is ConfirmationHandler.Result.Canceled -> this |
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.
Canceled
indicates the confirmation was canceled by the user, meaning they closed FormActivity in this case, so I don't think we need to update anything here
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.
@samer-stripe can you confirm this is right?
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.
There are internal events that might actually want to trigger based on cancelation. There's a cancellation action internally for None
, InformCancellation
, and ModifyDetails
.
- If
None
, do nothing - If
InformCancellation
, inform the user that they canceled the payment. Maybe through an internal method or through a result. Depends on the use case.FlowController
I believe sends a result. ModifyDetails
should perform an action to show the form again if needed.FlowController
uses this when the user clicksModify details
to re-open the form activity. We likely don't need for the default embedded case but will need it to use it for theContinue
GA case.
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.
In this case I believe in this is right given the form activity here at the moment acts like PaymentSheet
. We might actually want to clear any user error messages though on cancel. We do this in PaymentSheet
today.
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.
Updated to clear errors on canceled result and added test
) | ||
is ConfirmationHandler.Result.Canceled -> this |
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.
@samer-stripe can you confirm this is right?
Summary
Add
error
toFormActivityStateHolder.State
Add error returned from
ConfirmationHandler.Result.Failed
to state inFormActivityStateHelper.State.updateWithConfirmationState
Display error in
FormActivityUI
Adds screenshot tests
Motivation
https://jira.corp.stripe.com/browse/MOBILESDK-2997
Testing