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

Migrate PaymentController to PaymentLauncher within PaymentSheet components. #4159

Merged
merged 16 commits into from
Sep 3, 2021

Conversation

skyler-stripe
Copy link
Contributor

@skyler-stripe skyler-stripe commented Sep 1, 2021

Summary

  • Change out PaymentController for PaymentLauncher within PaymentSheetViewModel
  • Clean out PaymentFlowProcessor and related methods from PaymentSheetViewModel
  • Update tests to reflect changes.

Motivation

PaymentLauncher is a more modern api that gives us a few advantages over PaymentController. PaymentLauncher is more simple to use as it does not require us to handle the interim flows with PaymentFlowProcessor. It also uses ActivityResultLauncher which gives us more reliable result callbacks over startActivityForResult/onActivityResult.

doc on this project

Testing

  • Added tests
  • Modified tests
  • Manually verified

Recording

output

@skyler-stripe skyler-stripe changed the title [WIP] Migrate PaymentController to PaymentLauncher within PaymentSheet components. Migrate PaymentController to PaymentLauncher within PaymentSheet components. Sep 2, 2021
@skyler-stripe skyler-stripe marked this pull request as ready for review September 2, 2021 19:30
@skyler-stripe skyler-stripe self-assigned this Sep 2, 2021
Copy link
Collaborator

@ccen-stripe ccen-stripe left a comment

Choose a reason for hiding this comment

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

Thanks for the prompt change!

Copy link
Collaborator

@ccen-stripe ccen-stripe left a comment

Choose a reason for hiding this comment

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

two last minor points :)

@skyler-stripe skyler-stripe merged commit 0def576 into master Sep 3, 2021
@skyler-stripe skyler-stripe deleted the paymentLauncherMigration branch September 3, 2021 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.

None yet

3 participants