11
11
/**
12
12
* Sales transaction resource model
13
13
*
14
- * @author Magento Core Team <core@magentocommerce.com>
15
14
*/
16
15
class Transaction extends EntityAbstract implements TransactionResourceInterface
17
16
{
@@ -34,6 +33,7 @@ protected function _construct()
34
33
35
34
/**
36
35
* Update transactions in database using provided transaction as parent for them
36
+ *
37
37
* have to repeat the business logic to avoid accidental injection of wrong transactions
38
38
*
39
39
* @param \Magento\Sales\Model\Order\Payment\Transaction $transaction
@@ -149,7 +149,7 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $transacti
149
149
$ parentId = (int )$ this ->_lookupByTxnId ($ orderId , $ paymentId , $ parentTxnId , $ idFieldName );
150
150
if ($ parentId && $ txnType == 'authorization ' ) {
151
151
$ transaction ->setData ('parent_id ' , $ parentId );
152
- $ transaction ->setData ('txn_type ' ,\Magento \Sales \Model \Order \Payment \Transaction::TYPE_CAPTURE );
152
+ $ transaction ->setData ('txn_type ' , \Magento \Sales \Model \Order \Payment \Transaction::TYPE_CAPTURE );
153
153
}
154
154
} else {
155
155
$ result = $ this ->getParentId ($ orderId );
@@ -176,7 +176,7 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $transacti
176
176
* @param int $orderId
177
177
* @param int $paymentId
178
178
* @param string $txnId
179
- * @param mixed (array|string|object) $columns
179
+ * @param mixed $columns (array|string|object) $columns
180
180
* @param bool $isRow
181
181
* @param string $txnType
182
182
* @return array|string
@@ -234,7 +234,7 @@ protected function getParentId(int $orderId): array
234
234
)->where (
235
235
'order_id = ? ' ,
236
236
$ orderId
237
- )->order ('transaction_id ' ,'ASC ' )->limit (1 );
237
+ )->order ('transaction_id ' , 'ASC ' )->limit (1 );
238
238
return $ connection ->fetchAll ($ select );
239
239
}
240
240
}
0 commit comments