The attached patch adds settings options to the payment method to allow

1. Text to show on the checkout form when this payment method is selected
2. A validation rule to optionally ensure the order balance is 0 for the payment method.



Members fund testing for the Drupal project. Drupal Association Learn more


davidwhthomas’s picture

OK, one update to use filter_xss when outputting the payment method text setting on the checkout form.
This patches also includes some tidy up and "Set the payment method disabled by default" from ( )


Cottser’s picture

I like both of these ideas but the patch (and issue) should be split in two, one for each feature. Much easier to review that way. Does this allow modifying the payment method label as well?

davidwhthomas’s picture

Hi, it's a fairly short patch, no time / plans to separate it out at this stage.
1. Disable payment method by default.
2. Provide additional help text for payment form.
Regarding payment method label, I'm pretty sure that can already be changed any time in the payment method rule settings.

Cottser’s picture

I don't think commerce payment method labels can be changed without using an admin form or string overrides. The patch at #1781472: Make "No payment" payment option label configurable; add "information" option for submit_form callback looks to be more promising for that functionality.

rfay’s picture

You both look like you're paying careful attention to this module... Do you want commit access? I'm not using or caring for this, so want to make sure it's well taken care of. All I ask of maintainers is that they subscribe to all issues and be responsive, and make sure that all work is reflected in the issue queue (commits should follow issues where work is done publicly).

Cottser’s picture

@rfay - I was going to ask to be a co-maintainer, I'd be happy to help.

rfay’s picture

OK, you have full privs. I'll probably unsubscribe, so contact me via the contact form if you need anything.


Xano’s picture

Status: Needs review » Closed (won't fix)

Won't-fixing this issue, because Commerce No Payment is now abandoned in favor of Payment's Basic payment method. See #1932462: Migrate Commerce No Payment to Payment for work on migrating existing sites. Read Configuring "no payment required" payment methods to see how to replicate Commerce No Payment's behavior using Payment yourself.

Payment 7.x-1.x-dev (and soon 7.x-1.5) contains Rules conditions to evaluate the payment amount, which you can use to only let customers pay using the "no payment required" method if the amount is 0.