We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 3cab168b authored by cyattilakiss's avatar cyattilakiss Committed by GitHub

Merge pull request #437 from Adyen/PW-1265

PW-1265: add check if installments are enabled. fixes #432
parents 13859261 36f376c5
...@@ -70,7 +70,8 @@ class InstallmentValidator extends AbstractValidator ...@@ -70,7 +70,8 @@ class InstallmentValidator extends AbstractValidator
$fails = []; $fails = [];
$payment = $validationSubject['payment']; $payment = $validationSubject['payment'];
$quote = $this->session->getQuote(); $quote = $this->session->getQuote();
if ($quote) { $installmentsEnabled = $this->adyenHelper->getAdyenCcConfigData('enable_installments');
if ($quote && $installmentsEnabled) {
$grandTotal = $quote->getGrandTotal(); $grandTotal = $quote->getGrandTotal();
$installmentsAvailable = $this->adyenHelper->getAdyenCcConfigData('installments'); $installmentsAvailable = $this->adyenHelper->getAdyenCcConfigData('installments');
$installmentSelected = $payment->getAdditionalInformation('number_of_installments'); $installmentSelected = $payment->getAdditionalInformation('number_of_installments');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment