From 75f5e91309a9b39c7076526d5b9630680eed8780 Mon Sep 17 00:00:00 2001 From: kGablo Date: Wed, 17 Jan 2024 14:53:38 +0100 Subject: [PATCH] Blik fix --- Controller/tpay/Create.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Controller/tpay/Create.php b/Controller/tpay/Create.php index 4f24aad..095aa33 100644 --- a/Controller/tpay/Create.php +++ b/Controller/tpay/Create.php @@ -32,13 +32,12 @@ class Create extends Action private $cache; public function __construct( - Context $context, - TpayInterface $tpayModel, - TpayService $tpayService, - Session $checkoutSession, + Context $context, + TpayInterface $tpayModel, + TpayService $tpayService, + Session $checkoutSession, CacheInterface $cache - ) - { + ) { $this->tpay = $tpayModel; $this->tpayService = $tpayService; $this->checkoutSession = $checkoutSession; @@ -70,14 +69,14 @@ public function execute(): ResponseInterface $this->handleOpenApiTrId($paymentData, $transaction); - $this->tpayService->addCommentToHistory($orderId, 'Transaction title ' . $transaction['title']); + $this->tpayService->addCommentToHistory($orderId, 'Transaction title ' .$transaction['title']); $transactionUrl = $transaction['url']; if (true === $this->tpay->redirectToChannel()) { $transactionUrl = str_replace('gtitle', 'title', $transactionUrl); } - $this->tpayService->addCommentToHistory($orderId, 'Transaction link ' . $transactionUrl); + $this->tpayService->addCommentToHistory($orderId, 'Transaction link ' .$transactionUrl); $paymentData['additional_information']['transaction_url'] = $transactionUrl; $payment->setData($paymentData)->save(); @@ -132,8 +131,8 @@ private function prepareTransaction($orderId, array $additionalPaymentInformatio $data['channel'] = null; $this->handleBlikData($data, $additionalPaymentInformation['blik_code']); } else { - $data['group'] = (int)($additionalPaymentInformation['group'] ?? null); - $data['channel'] = (int)($additionalPaymentInformation['channel'] ?? null); + $data['group'] = (int) ($additionalPaymentInformation['group'] ?? null); + $data['channel'] = (int) ($additionalPaymentInformation['channel'] ?? null); if ($this->tpay->redirectToChannel()) { $data['direct'] = 1;