diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 30801e8..a515284 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,6 +1,6 @@ # Release Notes für Kauf auf Rechnung -## 2.0.4 (2020-02-17) +## 2.0.4 (2020-02-25) ### Gefixt - Alle Einstellungen / Beschränkungen werden nun korrekt abgefragt. diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 50de617..4004f1d 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,6 +1,6 @@ # Release Notes for Invoice -## 2.0.4 (2020-02-17) +## 2.0.4 (2020-02-25) ### Fixed - All settings / restrictions are now queried correctly. diff --git a/src/Methods/InvoicePaymentMethod.php b/src/Methods/InvoicePaymentMethod.php index 1a9259c..3f26297 100755 --- a/src/Methods/InvoicePaymentMethod.php +++ b/src/Methods/InvoicePaymentMethod.php @@ -70,8 +70,8 @@ public function __construct( */ public function isActive( BasketRepositoryContract $basketRepositoryContract):bool { - /** @var InvoiceLimitationsService $helper */ - $helper = pluginApp(InvoiceLimitationsService::class); + /** @var InvoiceLimitationsService $service */ + $service = pluginApp(InvoiceLimitationsService::class); /** @var ContactRepositoryContract $contactRepo */ $contactRepo = pluginApp(ContactRepositoryContract::class); @@ -87,7 +87,7 @@ public function isActive( BasketRepositoryContract $basketRepositoryContract):bo } catch(\Exception $ex) {} } - return $helper->respectsAllLimitations( + return $service->respectsAllLimitations( pluginApp(SettingsHelper::class, [$this->settings, $this->systemService->getPlentyId()]), $this->checkout->getShippingCountryId(), $isGuest, @@ -203,8 +203,8 @@ public function getDescription():string */ public function isSwitchableTo(int $orderId = null):bool { - /** @var InvoiceLimitationsService $helper */ - $helper = pluginApp(InvoiceLimitationsService::class); + /** @var InvoiceLimitationsService $service */ + $service = pluginApp(InvoiceLimitationsService::class); // If order ID is given check the order data if(!is_null($orderId) && $orderId > 0) { @@ -218,7 +218,7 @@ public function isSwitchableTo(int $orderId = null):bool $order = $orderRepo->findOrderById($orderId, ['amounts', 'addresses']); $contact = $order->contactReceiver; - return $helper->respectsAllLimitations( + return $service->respectsAllLimitations( pluginApp(SettingsHelper::class, [$this->settings, $order->plentyId]), $order->deliveryAddress->countryId, $contact === null || $contact->singleAccess === "1", @@ -248,7 +248,7 @@ public function isSwitchableTo(int $orderId = null):bool } catch(\Exception $ex) {} } - return $helper->respectsAllLimitations( + return $service->respectsAllLimitations( pluginApp(SettingsHelper::class, [$this->settings, $this->systemService->getPlentyId()]), $this->checkout->getShippingCountryId(), $isGuest,