Problem/Motivation

On creating a new credit card gateway config - already on loading the form, not on save - this PHP notice happens:

Notice: Undefined index: allowed_cards in Drupal\commerce_payone\Plugin\Commerce\PaymentGateway\PayoneCreditCard->buildConfigurationForm() (line 152 of /var/www/drupalvm/web/modules/contrib/commerce_payone/src/Plugin/Commerce/PaymentGateway/PayoneCreditCard.php

It's because there's no default value for 'allowed_cards' defined.

Steps to reproduce

Go to /admin/commerce/config/payment-gateways/add and select "Payone Credit Card (On-site)" and you'll see the warning in the watchdog logs

Proposed resolution

Add a default value for 'allowed_cards

CommentFileSizeAuthor
#2 3172347-2.patch537 bytesagoradesign

Comments

agoradesign created an issue. See original summary.

agoradesign’s picture

Status: Active » Needs review
StatusFileSize
new537 bytes

nikolai fischer’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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