diff --git a/composer.json b/composer.json index 8f6ce569c..68134e1b3 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "kiener/mollie-payments-plugin", "description": "Mollie Payments", - "version": "v1.0.2", + "version": "v1.0.3", "type": "shopware-platform-plugin", "license": "MIT", "authors": [ diff --git a/src/Handler/PaymentHandler.php b/src/Handler/PaymentHandler.php index 8fd38c285..6bf50d9a9 100644 --- a/src/Handler/PaymentHandler.php +++ b/src/Handler/PaymentHandler.php @@ -17,7 +17,7 @@ use Shopware\Core\Checkout\Payment\Cart\PaymentHandler\AsynchronousPaymentHandlerInterface; use Shopware\Core\Checkout\Payment\Exception\CustomerCanceledAsyncPaymentException; use Shopware\Core\Framework\DataAbstractionLayer\Exception\InconsistentCriteriaIdsException; -use Shopware\Core\Framework\Language\LanguageEntity; +use Shopware\Core\System\Language\LanguageEntity; use Shopware\Core\Framework\Validation\DataBag\RequestDataBag; use Shopware\Core\System\Currency\CurrencyEntity; use Shopware\Core\System\Locale\LocaleEntity; @@ -286,14 +286,6 @@ public function prepare(AsyncPaymentTransactionStruct $transaction, SalesChannel 'transactionId' => $transaction->getOrderTransaction()->getId() ], $this->router::ABSOLUTE_URL); - /** - * During local testing, we set this webhook URL to null, as our local URL - * is not supported by the Mollie API. - * - * @todo Remove webhook URL clearance before publishing. - */ - $webhookUrl = null; - /** * Build an array of order data to send in the request * to Mollie's Orders API to create an order payment. @@ -320,6 +312,11 @@ public function prepare(AsyncPaymentTransactionStruct $transaction, SalesChannel 'payment' => [] ]; + // Remove webhook URL on dev-environments + if (strtolower(getenv('APP_ENV')) === 'dev') { + unset($orderData['webhookUrl']); + } + $orderData = array_merge($orderData, $this->paymentMethodData); /** diff --git a/src/MolliePayments.php b/src/MolliePayments.php index d9ef1703a..d8bbc45a2 100644 --- a/src/MolliePayments.php +++ b/src/MolliePayments.php @@ -57,7 +57,7 @@ public function install(InstallContext $context) : void $this->container->get('payment_method.repository'), $this->container->get(PluginIdProvider::class), $this->container->get('system_config.repository'), - $this->getClassName() + get_class($this) ); $paymentMethodHelper->addPaymentMethods($context->getContext()); diff --git a/src/Service/CustomFieldService.php b/src/Service/CustomFieldService.php index 6d64d69e3..2da620942 100644 --- a/src/Service/CustomFieldService.php +++ b/src/Service/CustomFieldService.php @@ -1,4 +1,4 @@ -container = $container;