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

Allow iDEAL tokens saving when SEPA is disabled #3675

Merged
merged 5 commits into from
Dec 23, 2024

Conversation

wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Dec 20, 2024

Fixes #3465

Changes proposed in this Pull Request:

iDEAL tokens are stored as SEPA tokens. Because of that, when SEPA is disabled, it is not possible to add or list saved iDEAL tokens.

This PR adds SEPA to the list of valid payment method tokens when listing saved methods to fix the issue.

Testing instructions

  • Checkout and build this branch on your test environment (fix/allow-ideal-tokens-saving-when-sepa-is-disabled)
  • Connect your Stripe account
  • Set your store currency to EUR
  • Enable the iDEAL payment method in settings (wp-admin/admin.php?page=wc-settings&tab=checkout&section=stripe&panel=methods). Keep SEPA disabled
  • As a shopper, go to the Add Payment Method page (my-account/add-payment-method/)
  • Try to add a new iDEAL method
  • Confirm that the payment method is saved and is correctly listed:
    Screenshot 2024-12-23 at 10 55 10

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@wjrosa wjrosa self-assigned this Dec 23, 2024
@wjrosa wjrosa marked this pull request as ready for review December 23, 2024 13:46
@wjrosa wjrosa requested review from a team and Mayisha and removed request for a team December 23, 2024 13:57
Copy link
Contributor

@Mayisha Mayisha left a comment

Choose a reason for hiding this comment

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

Working as described 👍

I came across one edge case when I tested the following steps-

  • Enable iDeal and SEPA.
  • From My Account > Payment methods page, add a SEPA method. The method is added to the list.
  • Now disable SEPA.
  • Refresh the My Account > Payment methods. Notice that the added SEPA method shows up in the list.

Though I have documented the issue above, I think this is a very unlikely scenario for any site. So I am approving the PR as it fixes the original issue.

@wjrosa
Copy link
Contributor Author

wjrosa commented Dec 23, 2024

Working as described 👍

I came across one edge case when I tested the following steps-

  • Enable iDeal and SEPA.
  • From My Account > Payment methods page, add a SEPA method. The method is added to the list.
  • Now disable SEPA.
  • Refresh the My Account > Payment methods. Notice that the added SEPA method shows up in the list.

Though I have documented the issue above, I think this is a very unlikely scenario for any site. So I am approving the PR as it fixes the original issue.

Thanks for the review, Mayisha!

From what I could understand from the docs, both tokens are basically the same. So, SEPA tokens should be usable as iDEAL tokens and vice-versa.

@wjrosa wjrosa merged commit b1421eb into develop Dec 23, 2024
33 of 35 checks passed
@wjrosa wjrosa deleted the fix/allow-ideal-tokens-saving-when-sepa-is-disabled branch December 23, 2024 19:29
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.

Saving an iDEAL payment method doesn't appear in Woo unless you have the SEPA Debits payment methods enabled.
2 participants