From 56e62e2f16940f5d3792182b66607a61f44489a2 Mon Sep 17 00:00:00 2001 From: George van Engers Date: Mon, 30 Nov 2015 18:15:07 +0100 Subject: [PATCH] Third-party module compatibility: Quick checkout fix --- catalog/model/payment/mollie/base.php | 4 +++- .../template/payment/mollie_checkout_form.tpl | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/catalog/model/payment/mollie/base.php b/catalog/model/payment/mollie/base.php index 634ddf7b..e40c8177 100755 --- a/catalog/model/payment/mollie/base.php +++ b/catalog/model/payment/mollie/base.php @@ -69,7 +69,9 @@ public function getMethod ($address, $total) { $payment_method = $this->getAPIClient()->methods->get(static::MODULE_NAME); - $amount = round($total, 2); + // Quick checkout provides an array wile the default checkout provides only the total. + $amount = is_array($total) ? $total[0]['value'] : round($total, 2); + $minimum = $payment_method->getMinimumAmount(); $maximum = $payment_method->getMaximumAmount(); diff --git a/catalog/view/theme/default/template/payment/mollie_checkout_form.tpl b/catalog/view/theme/default/template/payment/mollie_checkout_form.tpl index 19a9e1f3..f0a2e0ea 100755 --- a/catalog/view/theme/default/template/payment/mollie_checkout_form.tpl +++ b/catalog/view/theme/default/template/payment/mollie_checkout_form.tpl @@ -35,6 +35,25 @@