Skip to content
Snippets Groups Projects
Commit 4c766a81 authored by Vadym Abramchuk's avatar Vadym Abramchuk Committed by Vadym Abramchuk
Browse files

Issue #3270758 by abramm: Rename $plugin variable to make it more obvious what plugin is

parent 6273210c
Branches
Tags
1 merge request!6Issue #3270758: 3D Secure support
......@@ -22,12 +22,14 @@ class PaymentMethodAddForm extends BasePaymentMethodAddForm {
// Alter the form with Omise specific needs.
$element['#attributes']['class'][] = 'omise-form';
// Set our key to settings array.
if (!($this->plugin instanceof OmiseInterface)) {
$paymentGatewayPlugin = $this->plugin;
if (!($paymentGatewayPlugin instanceof OmiseInterface)) {
throw new \InvalidArgumentException('Omise payment method required.');
}
// Set our key to settings array.
$element['#attached']['drupalSettings']['commerceOmise'] = [
'publicKey' => $this->plugin->getPublicKey(),
'publicKey' => $paymentGatewayPlugin->getPublicKey(),
];
// To display validation errors.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment