From logs:

Notice: Undefined index: cardonfile in commerce_authnet_aim_submit_form_validate() (line 186 of .../commerce_authnet.module).

Comments

dabblela’s picture

Status: Active » Needs review
StatusFileSize
new764 bytes
eisagholi’s picture

I had the same issue, tried the patch didn't work because the error was caused by the $pane_values['cardonfile']

So I changed line 186 from:

if (module_exists('commerce_cardonfile') && $payment_method['settings']['cim_cardonfile'] && $pane_values['cardonfile'] !== 'new') {

to:

if (module_exists('commerce_cardonfile') && $payment_method['settings']['cim_cardonfile'] && !empty($pane_values['cardonfile']) && $pane_values['cardonfile'] !== 'new') {

And this worked for me.

stevesmename’s picture

The suggested patch is similar to line 208 in the .module file as well.

andyg5000’s picture

Category: bug » task
StatusFileSize
new800 bytes

Here's a patch that matches the convention in line 208 as was suggested as a fix in #2. #1 works as well, but best to follow convention already set.

Changing from Bug Report to task since it's just an notice.

andyg5000’s picture

After further review, both $payment_method['settings']['cim_cardonfile'] & $pane_values['cardonfile'] throw undefined index errors. Attached is a patch that checks both. It also adds an additional check to the line 209.

rickmanelius’s picture

Hi. I'm unable to recreate the php error using Commerce Kickstart 2.0-rc1 and the latest dev version of this module. Can anyone provide instructions on how to recreate it? I'll gladly review/test the patch.

rszrama’s picture

Status: Needs review » Fixed

Sorry, unknowingly I already committed a fix for this bug when I turned it up in testing of the transaction type select list on the payment terminal form. : O

Status: Fixed » Closed (fixed)

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