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

Populate pi in error #707

Merged
merged 4 commits into from
May 29, 2024
Merged

Populate pi in error #707

merged 4 commits into from
May 29, 2024

Conversation

ianlin-bbpos
Copy link
Collaborator

Summary

Populate PaymentIntent when there is an error after calling collectPaymentMethod/confirmPaymentIntent

Motivation

It would be useful to know which state the payment intent is in after the error has occurred.

Testing

  • I tested this manually
  • I added automated tests

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

Copy link
Collaborator

@nazli-stripe nazli-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slight changes for JS parts, also assuming iOS needs to be updated as well?

@@ -88,6 +88,7 @@ export type LocationStatus = 'notSet' | 'set' | 'unknown';
export type StripeError<T = CommonError> = {
code: T;
message: string;
paymentIntent?: PaymentIntent.Type;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be better to modify the PaymentIntentResultType and add a third option that has both error and PI populated

@nazli-stripe nazli-stripe merged commit 7699879 into main May 29, 2024
2 checks passed
@nazli-stripe nazli-stripe deleted the bbpos/populate-pi-when-error branch September 6, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants