From 9f0c4c93fa0fd6917ee47a67330e1cc57631b964 Mon Sep 17 00:00:00 2001 From: margud Date: Thu, 2 Dec 2021 13:54:22 +0200 Subject: [PATCH] fixed review issues --- controllers/front/webhook.php | 1 - src/Handler/Order/OrderCreationHandler.php | 2 +- src/Service/ApiService.php | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/front/webhook.php b/controllers/front/webhook.php index 34c51b9f1..4ebc374e4 100644 --- a/controllers/front/webhook.php +++ b/controllers/front/webhook.php @@ -74,7 +74,6 @@ protected function executeWebhook() if (!$this->module->api) { return 'API key is missing or incorrect'; } - try { if (TransactionUtility::isOrderTransaction($transactionId)) { $payment = $transactionService->processTransaction($this->module->api->orders->get($transactionId, ['embed' => 'payments'])); diff --git a/src/Handler/Order/OrderCreationHandler.php b/src/Handler/Order/OrderCreationHandler.php index 338a85125..a2de72cc0 100644 --- a/src/Handler/Order/OrderCreationHandler.php +++ b/src/Handler/Order/OrderCreationHandler.php @@ -167,7 +167,7 @@ public function createOrder($apiPayment, $cartId, $isKlarnaOrder = false) $this->module->validateOrder( (int) $cartId, - (int) Configuration::get(Mollie\Config\Config::MOLLIE_STATUS_OPEN), + (int) Configuration::get(Mollie\Config\Config::MOLLIE_STATUS_AWAITING), (float) $apiPayment->amount->value, isset(Config::$methods[$apiPayment->method]) ? Config::$methods[$apiPayment->method] : $this->module->name, null, diff --git a/src/Service/ApiService.php b/src/Service/ApiService.php index 74a36aebf..013b7549b 100644 --- a/src/Service/ApiService.php +++ b/src/Service/ApiService.php @@ -147,6 +147,8 @@ public function getMethodsForConfig(MollieApiClient $api, $path) private function getMethodsObjForConfig($apiMethods) { + $this->environment = (int) $this->configurationAdapter->get(Config::MOLLIE_ENVIRONMENT); + $methods = []; $defaultPaymentMethod = new MolPaymentMethod(); $defaultPaymentMethod->enabled = false;