Skip to content

Commit

Permalink
Fix issue with follow payment method
Browse files Browse the repository at this point in the history
  • Loading branch information
annevelden committed Feb 22, 2024
1 parent 7bcf383 commit 6845fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/PayPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6845fb2

Please sign in to comment.