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

Case-sensitive PaymentMethods::is_active() #83

Closed
rvdsteege opened this issue Nov 14, 2022 · 2 comments
Closed

Case-sensitive PaymentMethods::is_active() #83

rvdsteege opened this issue Nov 14, 2022 · 2 comments
Assignees
Labels

Comments

@rvdsteege
Copy link
Member

rvdsteege commented Nov 14, 2022

It came to our attention in a support ticket that the value of an option in the Ninja Forms payment methods field is case-sensitive. Within Ninja Forms, the PaymentMethods::is_active( $payment_method ) method is used to check if the given payment method is active, before creating the payment.

Would it be beneficial to transform the payment method to lowercase in the is_active() method? Or would that be a potential issue if gateway add-ons can maybe register their own payment methods — with any constant to their liking — in the future?

Internal Help Scout ticket: https://secure.helpscout.net/conversation/2067045031/24787/

@remcotolsma
Copy link
Member

Maybe related issue:

@remcotolsma remcotolsma moved this to Todo in Pronamic Pay Nov 14, 2022
@remcotolsma
Copy link
Member

Would it be beneficial to transform the payment method to lowercase in the is_active() method? Or would that be a potential issue if gateway add-ons can maybe register their own payment methods — with any constant to their liking — in the future?

I'm not in favor of this, let's focus on making the Ninja Forms payment method field less error prone:

Automatically changing capital to lower case is not very obvious, if that can be avoided that would be nice.

@github-project-automation github-project-automation bot moved this from Todo to Done in Pronamic Pay Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants