Skip to content

Commit

Permalink
Code polish
Browse files Browse the repository at this point in the history
  • Loading branch information
woutse committed Feb 20, 2024
1 parent 3c27706 commit 2b7992f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Controller/Checkout/Finish.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function execute()
if (empty($successUrl)) {
$successUrl = ($payment->getMethod() == 'paynl_payment_paylink' || $this->config->sendEcommerceAnalytics()) ? Config::FINISH_PAY : Config::FINISH_STANDARD;
}
$this->payHelper->logDebug('Finish succes,', [$successUrl, $payOrderId, $bSuccess, $bVerify]);
$this->payHelper->logDebug('Finish succes', [$successUrl, $payOrderId, $bSuccess, $bVerify]);
$resultRedirect->setPath($successUrl, ['_query' => ['utm_nooverride' => '1']]);
if ($isPinTransaction && $pinStatus->getTransactionState() !== 'approved') {
$this->messageManager->addNoticeMessage(__('Order has been placed and payment is pending'));
Expand All @@ -207,7 +207,7 @@ public function execute()
} elseif ($this->config->sendEcommerceAnalytics()) {
$successUrl = Config::FINISH_PAY;
}
$this->payHelper->logDebug('Finish succes,', [$successUrl, $payOrderId]);
$this->payHelper->logDebug('Finish succes', [$successUrl, $payOrderId]);
$resultRedirect->setPath($successUrl, ['_query' => ['utm_nooverride' => '1']]);
$this->deactivateCart($order, $payOrderId);
} else {
Expand Down
2 changes: 1 addition & 1 deletion Model/PayPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function processPaidOrder(PayTransaction $transaction, Order $order, $pay
$payment->setPreparedMessage('PAY. - ');
$payment->setIsTransactionClosed(0);

if ($this->config->getFollowPaymentMethod()) {
if ($this->config->getFollowPaymentMethod() && !empty($paymentProfileId)) {
$transactionMethod = $this->config->getPaymentMethod($paymentProfileId);
if ($transactionMethod['code'] !== $paymentMethod) {
$payment->setMethod($transactionMethod['code']);
Expand Down

0 comments on commit 2b7992f

Please sign in to comment.