Notice: Undefined index: cca_status in Drupal\commerce_authnet\Plugin\Commerce\PaymentGateway\AcceptJs->getJsLibrary() (line 192

I get this notice filling the logs after updating to 1.0-rc1.

Comments

mortona2k created an issue. See original summary.

cchoe1’s picture

StatusFileSize
new720 bytes

Inside the IF statement to check for a configuration value, I added an isset() to check for the element keyed by 'cca_status' rather than just a plain IF statement.

cchoe1’s picture

StatusFileSize
new620 bytes

Sorry... I generated the patch file incorrectly. I think this should work.

saurabh.dhariwal’s picture

StatusFileSize
new795 bytes

@cchoe1, Your above patches didn't work for me. I attached the new patch to resolve the same error. Please review it & Let me know your views for the same.
I got the same error when I enabled the module and creating Payment gateway method.

Thanks!.

saurabh.dhariwal’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: authnet-cca-2974310-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

cchoe1’s picture

My patch indeed did not work. I thought there was an issue of checking for an array key without using isset() but that doesn't seem to be the issue. Can I ask how your experience has been with your patch file? Any issues? I see that it failed 1 test so I am hesitant to put it on production.

czigor’s picture

Status: Needs work » Needs review
StatusFileSize
new1.32 KB

Fixing tests in #4.

  • czigor committed d7d485e on 8.x-1.x
    Issue #2974310 by cchoe1, saurabh.dhariwal, czigor: Undefined index:...
czigor’s picture

Status: Needs review » Fixed

Thanks for all the contributions, this has been fixed!

Status: Fixed » Closed (fixed)

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