diff --git a/src/Provider/PaymentOption/CreditCardPaymentOptionProvider.php b/src/Provider/PaymentOption/CreditCardPaymentOptionProvider.php index fc23bf799..170b81260 100644 --- a/src/Provider/PaymentOption/CreditCardPaymentOptionProvider.php +++ b/src/Provider/PaymentOption/CreditCardPaymentOptionProvider.php @@ -175,23 +175,20 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod) $paymentFee = $this->paymentFeeProvider->getPaymentFee($paymentMethod); if ($paymentFee) { - $paymentOption->setInputs([ - [ - 'type' => 'hidden', - 'name' => 'mollieCardToken', - 'value' => '', - ], - [ - 'type' => 'hidden', - 'name' => 'payment-fee-price', - 'value' => $paymentFee, - ], - [ - 'type' => 'hidden', - 'name' => 'payment-fee-price-display', - 'value' => sprintf($this->module->l('Payment Fee: %1s'), Tools::displayPrice($paymentFee)), - ], - ]); + $paymentOption->setInputs( + array_merge($paymentOption->getInputs(), [ + [ + 'type' => 'hidden', + 'name' => 'payment-fee-price', + 'value' => $paymentFee, + ], + [ + 'type' => 'hidden', + 'name' => 'payment-fee-price-display', + 'value' => sprintf($this->module->l('Payment Fee: %1s'), Tools::displayPrice($paymentFee)), + ], + ]) + ); } return $paymentOption; diff --git a/src/Provider/PaymentOption/CreditCardSingleClickPaymentOptionProvider.php b/src/Provider/PaymentOption/CreditCardSingleClickPaymentOptionProvider.php index 25d3c70a9..abba402b1 100644 --- a/src/Provider/PaymentOption/CreditCardSingleClickPaymentOptionProvider.php +++ b/src/Provider/PaymentOption/CreditCardSingleClickPaymentOptionProvider.php @@ -179,18 +179,20 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod) $paymentFee = $this->paymentFeeProvider->getPaymentFee($paymentMethod); if ($paymentFee) { - $paymentOption->setInputs([ - [ - 'type' => 'hidden', - 'name' => 'payment-fee-price', - 'value' => $paymentFee, - ], - [ - 'type' => 'hidden', - 'name' => 'payment-fee-price-display', - 'value' => sprintf($this->module->l('Payment Fee: %1s'), Tools::displayPrice($paymentFee)), - ], - ]); + $paymentOption->setInputs( + array_merge($paymentOption->getInputs(), [ + [ + 'type' => 'hidden', + 'name' => 'payment-fee-price', + 'value' => $paymentFee, + ], + [ + 'type' => 'hidden', + 'name' => 'payment-fee-price-display', + 'value' => sprintf($this->module->l('Payment Fee: %1s'), Tools::displayPrice($paymentFee)), + ], + ]) + ); } return $paymentOption;