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

useSelectedPaymentOptions can return undocumented undefined #2257

Open
edhgoose opened this issue Aug 9, 2024 · 1 comment
Open

useSelectedPaymentOptions can return undocumented undefined #2257

edhgoose opened this issue Aug 9, 2024 · 1 comment
Labels
bug Something isn't working Checkout UI Extensions

Comments

@edhgoose
Copy link

edhgoose commented Aug 9, 2024

Please list the package(s) involved in the issue, and include the version you are using

checkout-ui-extensions

Describe the bug

The documentation for useSelectedPaymentOptions is defined as returning a number of values for handle here.

Those options for handle do not include undefined.

Steps to reproduce the behavior:

  1. Make a purchase using a bogus payment gateway, with a fake credit card
  2. Check the output of useSelectedPaymentOptions
  3. Confirm the handle is undefined

Worth noting, we can see it in production too - with real clients with real payment methods.

Expected behavior

I'd expect either:

  1. The documentation to explain the value can be undefined for some cases and to explain why.
  2. The code should be updated to never return undefined as per the current documentation.

Screenshots

An example of undefined:

CleanShot 2024-08-09 at 14 02 58@2x

Additional context

I assume this is unrelated to #2068 - but referencing it here for completeness.

@edhgoose edhgoose added the bug Something isn't working label Aug 9, 2024
@jun-shop jun-shop removed the SEV-3 label Aug 19, 2024
@edhgoose
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Checkout UI Extensions
Projects
None yet
Development

No branches or pull requests

3 participants