From eec24352b982397e0f68b819b634faddfa81e618 Mon Sep 17 00:00:00 2001 From: waschier-design Date: Fri, 5 Jun 2020 11:20:27 +0200 Subject: [PATCH] Error with payment method PS 1.6.1 Issue #167 Missing Payment Methods in PS 1.6.1 --- mollie.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mollie.php b/mollie.php index 674d53afd..0ed2ef197 100644 --- a/mollie.php +++ b/mollie.php @@ -623,7 +623,7 @@ public function hookDisplayPaymentEU() $methods = $paymentMethodService->getMethodsForCheckout(); $issuerList = []; foreach ($methods as $apiMethod) { - if ($apiMethod['id'] === _PhpScoper5ece82d7231e4\Mollie\Api\Types\PaymentMethod::IDEAL) { + if ($apiMethod['id_method'] === _PhpScoper5ece82d7231e4\Mollie\Api\Types\PaymentMethod::IDEAL) { $issuerList = $issuerService->getIdealIssuers(); } } @@ -633,22 +633,22 @@ public function hookDisplayPaymentEU() $paymentOptions = []; foreach ($methods as $method) { - if (!isset(Mollie\Config\Config::$methodCurrencies[$method['id']])) { + if (!isset(Mollie\Config\Config::$methodCurrencies[$method['id_method']])) { continue; } - if (!in_array($iso, Mollie\Config\Config::$methodCurrencies[$method['id']])) { + if (!in_array($iso, Mollie\Config\Config::$methodCurrencies[$method['id_method']])) { continue; } - + $images = json_decode($method['images_json'],true); $paymentOptions[] = [ - 'cta_text' => $this->lang($method['name']), + 'cta_text' => $this->lang($method['method_name']), 'logo' => Configuration::get(Mollie\Config\Config::MOLLIE_IMAGES) === Mollie\Config\Config::LOGOS_NORMAL - ? $method['image']['size1x'] - : $method['image']['size2x'], + ? $images['size1x'] + : $images['size2x'], 'action' => $this->context->link->getModuleLink( 'mollie', 'payment', - ['method' => $method['id'], 'rand' => time()], + ['method' => $method['id_method'], 'rand' => time()], true ), ]; @@ -1179,4 +1179,4 @@ private function setApiKey() PrestaShopLogger::addLog(__METHOD__ . ' said: ' . $this->warning, Mollie\Config\Config::CRASH); } } -} \ No newline at end of file +}