diff --git a/Model/PayPayment.php b/Model/PayPayment.php index 3a1f773a..574e01c6 100644 --- a/Model/PayPayment.php +++ b/Model/PayPayment.php @@ -261,7 +261,7 @@ public function processPaidOrder(PayTransaction $transaction, Order $order, $pay if ($this->config->getFollowPaymentMethod() && !empty($paymentProfileId)) { $transactionMethod = $this->config->getPaymentMethod($paymentProfileId); - if ($transactionMethod['code'] !== $paymentMethod) { + if (!empty($transactionMethod['code']) && $transactionMethod['code'] !== $paymentMethod) { $payment->setMethod($transactionMethod['code']); $paymentMethodObj = $this->config->getPaymentMethodByCode($paymentMethod); $order->addStatusHistoryComment(__('PAY.: Payment method changed from %1 to %2', ($paymentMethodObj['title'] ?? ''), ($transactionMethod['title'] ?? '')))->save(); diff --git a/composer.json b/composer.json index e6d6068b..d3b4c497 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "paynl/magento2-plugin", "description": "PAY. Payment methods for Magento2", "type": "magento2-module", - "version": "3.11.1", + "version": "3.11.2", "require": { "magento/module-sales": "^102.0.0 || ^103.0.0", "magento/module-payment": "^100.3.0",