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

Incorrect redirect via fetchPaymentMethods #52

Open
bavodeclercq opened this issue Aug 29, 2023 · 2 comments
Open

Incorrect redirect via fetchPaymentMethods #52

bavodeclercq opened this issue Aug 29, 2023 · 2 comments
Labels

Comments

@bavodeclercq
Copy link

Description

On the front-end, I'm using the gateway.fetchPaymentMethods() function to list payment methods as radio buttons. Previously, when a radio button was selected and the form was submitted, the user would be taken directly to the corresponding payment method in Mollie. However, the current behavior is different. After selecting a radio button and submitting the form, instead of being directed to the chosen payment method in Mollie, the user is taken to the general "select-method" page on the Mollie side. This requires the user to make the same selection again.

I also attempted to use the gateway.getPaymentFormHtml([]) function, but the issue persists in this scenario as well.

Steps to reproduce

  1. Navigate to the checkout page.
  2. Select a payment method from the list of radio buttons generated using gateway.fetchPaymentMethods().
  3. Submit the form.
  4. Instead of being taken directly to the chosen payment method in Mollie, you are redirected to the generic "select-method" page on the Mollie platform.

Additional info

  • Craft version: Craft Pro 4.4.17
  • PHP version: 8.1.21
  • Database driver & version: MySQL 8.0.33
  • Plugins & versions:
    Colour Swatches 4.3.0
    Cookies 4.0.0
    CP Field Inspect 1.4.4
    Craft Commerce 4.2.11
    Default Dashboard 2.0.0
    Eager Beaver 4.0.2
    Elements Panel 2.0.0
    Embedded Assets 3.1.6
    Expanded Singles 2.0.5
    Feed Me 5.2.0
    Formie 2.0.34.1
    Hyper 1.1.11
    Image Resizer 3.0.6
    Knock Knock 2.0.10
    Mailchimp Transactional 2.0.1
    Maps 4.0.4
    Minify 4.0.0-beta.2
    Mollie for Craft Commerce 4.1.0.1
    Neo 3.8.6
    Password Policy 4.1.0
    PDF Transform 2.0.1
    Preparse Field 2.0.2
    Retour 4.1.13
    Sentry SDK 2.0.1
    SEOmatic 4.0.30
    Sprig 2.6.2
    Style Inliner 3.0.3
    Super Table 3.0.9
    Translations 2.2.1
    Typogrify 4.0.1
    Vite 4.0.6
    Vizy 2.1.8
@lukeholder
Copy link
Member

I can't seem to reproduce this issue using getPaymentFormHtml() could there be a mollie side setting I am missing?

@bavodeclercq
Copy link
Author

Diving into Craft Commerce's paymentsController and debugging within the actionPay function, it appears that the parameter name for payment methods should be more specific. Instead of just paymentMethod, it should be paymentForm[mollie][paymentMethod]. Making this adjustment resolves the issue for me. I'm unsure whether this change originates from Commerce or Mollie themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants