Guest checkout results in: Undefined array key "customer_email"

Created on 9 September 2025, 2 days ago

Problem/Motivation

While testing checkout on a D7->D10 upgrade site, after checkout on the order success page an error was shown:

Error message
Warning: Undefined array key "customer_email" in Drupal commerce_authnet\Plugin\Commerce\PaymentGateway\Accept/s->doCreatePaymentMethod() (line 728 of
modules/contrib/commerce_authnet/src/Plugin/Commerce/PaymentGateway/AcceptJs.php).

This points to this code:

        $profile = new Profile([
          // @todo how to allow altering.
          'merchantCustomerId' => $owner->id() . '_' . $this->time->getRequestTime(),
          'email' => $payment_details['customer_email'],
        ]);

Steps to reproduce

Complete an authnet-paid order as a guest.

Proposed resolution

Fix the bug (-:

Remaining tasks

Fix the bug.

User interface changes

The error won't show when checking out as a guest.

API changes

TBD

Data model changes

TBD

๐Ÿ› Bug report
Status

Active

Version

1.11

Component

User interface

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States damienmckenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024