From 0c9f9c21de5a810a0c3cbe5be17c740896aaa990 Mon Sep 17 00:00:00 2001 From: sekulich-mygento Date: Wed, 23 Oct 2024 15:48:49 +0300 Subject: [PATCH] Change return value to OrderPaymentInterface --- Helper/Transaction.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Helper/Transaction.php b/Helper/Transaction.php index 20be5f9..f18bd90 100644 --- a/Helper/Transaction.php +++ b/Helper/Transaction.php @@ -59,6 +59,8 @@ public function __construct( * @param string $transactionId * @param float $amount * @param array $transData + * + * @return \Magento\Sales\Api\Data\OrderPaymentInterface */ public function proceedAuthorize($order, $transactionId, $amount, $transData = []) { @@ -80,6 +82,8 @@ public function proceedAuthorize($order, $transactionId, $amount, $transData = [ $transData ); } + + return $payment; } /** @@ -87,6 +91,8 @@ public function proceedAuthorize($order, $transactionId, $amount, $transData = [ * @param string $transactionId * @param float $amount * @param array $transData + * + * @return \Magento\Sales\Api\Data\OrderPaymentInterface */ public function proceedCapture($order, $transactionId, $amount, $transData = []) { @@ -108,6 +114,8 @@ public function proceedCapture($order, $transactionId, $amount, $transData = []) $transData ); } + + return $payment; } /** @@ -115,6 +123,8 @@ public function proceedCapture($order, $transactionId, $amount, $transData = []) * @param string $transactionId * @param string $parentTransactionId * @param float $amount + * + * @return \Magento\Sales\Api\Data\OrderPaymentInterface */ public function proceedRefund($order, $transactionId, $parentTransactionId, $amount) { @@ -128,6 +138,8 @@ public function proceedRefund($order, $transactionId, $parentTransactionId, $amo $payment->registerRefundNotification($amount); $this->orderRepository->save($order); + + return $payment; } /** @@ -135,6 +147,8 @@ public function proceedRefund($order, $transactionId, $parentTransactionId, $amo * @param string $transactionId * @param string $parentTransactionId * @param float $amount + * + * @return \Magento\Sales\Api\Data\OrderPaymentInterface */ public function proceedVoid($order, $transactionId, $parentTransactionId, $amount) { @@ -144,6 +158,8 @@ public function proceedVoid($order, $transactionId, $parentTransactionId, $amoun $payment->registerVoidNotification($amount); $this->orderRepository->save($order); + + return $payment; } /** @@ -151,6 +167,8 @@ public function proceedVoid($order, $transactionId, $parentTransactionId, $amoun * @param string $transactionId * @param string $parentTransactionId * @param mixed $transData + * + * @return \Magento\Sales\Api\Data\OrderPaymentInterface */ public function proceedReceipt($order, $transactionId, $parentTransactionId, $transData) { @@ -189,6 +207,8 @@ public function proceedReceipt($order, $transactionId, $parentTransactionId, $tr ); $this->orderRepository->save($order); + + return $payment; } /** @@ -196,6 +216,8 @@ public function proceedReceipt($order, $transactionId, $parentTransactionId, $tr * @param string $transactionId * @param string $parentTransactionId * @param mixed $transData + * + * @return \Magento\Sales\Api\Data\OrderPaymentInterface */ public function proceedRefundReceipt($order, $transactionId, $parentTransactionId, $transData) { @@ -234,6 +256,8 @@ public function proceedRefundReceipt($order, $transactionId, $parentTransactionI ); $this->orderRepository->save($order); + + return $payment; } /**