Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Payment selection not working on payment method change #165

Open
villesiltala opened this issue Aug 18, 2024 · 5 comments
Open

Payment selection not working on payment method change #165

villesiltala opened this issue Aug 18, 2024 · 5 comments
Labels
question Further information is requested

Comments

@villesiltala
Copy link

villesiltala commented Aug 18, 2024

Describe the bug

With WooCommerce Subscriptions plugin a customer can change the selected payment method after an initial purchase. The payment method selection does not work on the user acocunt page.

Steps to Reproduce

An existing customer can change their selected payment method with the WooCommerce Subscription plugin. The view can be found from my account under the user's subscriptions page. When clicking the "Change payment method" button next to an subscription, the user is taken to a page similar to the checkout page. On a Finnish site, the URL is something as follows:

/kassa/maksa/16212/?pay_for_order=true&key=wc_order_nSBlUcMx7tY3s&change_payment_method=16212&_wpnonce=770b152749

The script used for the toggle functionality of the payment provider groups does not work on the page. It is assumed, the method selection does not work either.

Expected behaviour

The payment provider group selection and payment method selection are visually and functionally comparable to the checkout page.

Actual behaviour

The CSS and JS do not function on the payment method selection page.

@villesiltala villesiltala added the question Further information is requested label Aug 18, 2024
@kotivuori
Copy link
Collaborator

Hi! Paytrail supports card payments as saved payment methods. Therefore, this page doesn’t display other payment methods like bank or mobile payments, as they can’t be used as saved payment methods.

When you click "Add payment method" are you redirected to Paytrail card form?

@villesiltala
Copy link
Author

Hi!

I am not sure if I understood the question. The page I am referring to is a generic feature for the Subscriptions plugin where you can change your selected payment method for an existing subscription. Please refer to the official documentation for the feature:
https://woocommerce.com/document/subscriptions/customers-view/subscriber-payment-methods/#change-subscription-payment-method

As described in my initial bug report, the only issue in the payment method change view at the moment seems to be that the JS and CSS are not loaded as they are on the checkout page.

@kotivuori
Copy link
Collaborator

Hi,
This is what the page is suppose to look like if you have previously saved cards. Other payment methods are not rendered since they don't support tokenization that is a requirement for subscription payments.
Screenshot 2024-11-06 at 16 01 29

@villesiltala
Copy link
Author

Hi!

WooCommerce Subscription also supports manual payments. This is also a supported feature in the Paytrail for WooCommerce plugin. If the WooCommerce site is not using card payments and allows manual renewals for subscriptions, the customer can access the payment selection page on their account as described above. This is not be confused with the card payment process.

The same issue is visible also on the payment page where the customer is redirected after an erroneous payment. The following screenshot is taken on a page where the customer is redirected after cancelling the payment. The url is formatted as follows:

/kassa/maksa/xxx/?pay_for_order=true&key=wc_order_xxx&checkout-account=xxx&checkout-algorithm=sha256&checkout-amount=xxx&checkout-stamp=xxx&checkout-reference=xxx&checkout-status=fail&checkout-provider=osuuspankki&checkout-transaction-id=xxx
Screenshot 2024-11-06 at 17 48 24

Here the list of payment providers is not displayed correctly and you can't select a payment method. Again, CSS and JS are not functioning as they are on the regular payment page.

Please look into the enqueue and triggering processes for both the CSS and JS and ensure they work in different payment views used by WooCommerce and the WooCommerce Subscription plugin. Thanks!

@villesiltala
Copy link
Author

The same view is also reachable from the admin side for orders with a status of "pending payment". In the following screenshot, the link "Asiakkaan maksusivu" takes you to the payment page with broken payment method selection form.
Screenshot 2024-11-06 at 18 06 46

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants