At http://www.drupalcommerce.org/specification/info-hooks/payment I read

settings - ($settings = NULL) - returns form elements for the payment method’s settings form included as part of the payment method’s enabling action in Rules

When enabling the rule of commerce_authnet.module, I don't get the settings form.
Let alone that I would get it when implementing the same callback in my own payment module.

Where did we go wrong? ;-)

Ps: I use Rules 7.x-2.0-alpha2

Comments

pieterdc’s picture

The documentation (also included in commerce_payment.api.php) suggests we should use a _settings() function while the current Authorize.net and Paypal WPS modules use a _settings_form() function.

Neither seem to work (in my setup).

rszrama’s picture

Looks like the documentation is wrong indeed - it should be _settings_form(). I wonder if you not getting anything is due to your Rules version... I'm running on the latest CVS HEAD. Can you try the Auth.Net rule using the latest Rules dev version? I'll go fix the docs right now... that hook documentation in the .api.php hasn't been updated for quite some time either.

pieterdc’s picture

Status: Active » Needs review

Didn't need to upgrade any module.

But I was expecting the settings to be under 'settings' of the rule, but instead, it can be found under 'settings' of the action of the payment rule.
And it doesn't show up when enabling a rule.
Which tremendously hides this feature.

Would be best to make this more obvious, in a way. Any suggestions?

rszrama’s picture

Status: Needs review » Fixed

Good idea. We'll document this more completely, but in the meantime I've added a help message to the overview page:

https://github.com/rszrama/drupalcommerce/commit/c5467cdcf2aee71ca281d08...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.