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 Payment method name (as available in script editor and payment functions) #2301

Open
mubbo opened this issue Aug 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mubbo
Copy link

mubbo commented Aug 23, 2024

Please list the related package(s)

checkout-ui-extensions

If this related to specific APIs or components, please list them here

useSelectedPaymentOptions [PaymentOption]

Is your feature request related to a problem? Please describe.

I need to take certain action when a specific payment method is selected by the customer

Describe the changes you are looking for

Currently the PaymentOption object has two properties, type and handle. The type refers to the type of payment method it is e.g.: creditcard, deferred, manualPayment etc. and a unique handle. It would be possible to determine which payment method has been selected based on the handle that is returned but as far as the documentation states the handle is not globally unique and therefore could be different per shop and even supposedly from checkout session to checkout session.

This would not allow for the creation of an installable app with an input where the Merchant could select or enter a payment method name to observe as the handle, as far as I am aware, only available at run time.

Describe alternatives you’ve considered

The only approach would be to intall the app which would write the handle to the console, take a note of it, modify the extension with the hard coded handle and republish the app. This really cant be the desired method can it?

@mubbo mubbo added the enhancement New feature or request label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant