Skip to content

Commit 0a685d7

Browse files
AC-10042::/V1/transactions REST API returns error when parent_txn_id = txn_id
1 parent 10eb2e6 commit 0a685d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Sales/Model/ResourceModel/Order/Payment/Transaction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
/**
1212
* Sales transaction resource model
1313
*
14-
* @author Magento Core Team <core@magentocommerce.com>
1514
*/
1615
class Transaction extends EntityAbstract implements TransactionResourceInterface
1716
{
@@ -152,7 +151,7 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $transacti
152151
}*/
153152
} else {
154153
$oldParentTxnId = $this->getParentTxnId($orderId);
155-
if($oldParentTxnId) {
154+
if ($oldParentTxnId) {
156155
$transaction->setData('parent_txn_id', $oldParentTxnId);
157156
}
158157
}
@@ -220,7 +219,8 @@ private function _getLoadByUniqueKeySelect($orderId, $paymentId, $txnId, $column
220219
* Retrieve transaction by the unique key of order_id
221220
* @param int $orderId
222221
*/
223-
protected function getParentTxnId($orderId) {
222+
protected function getParentTxnId($orderId)
223+
{
224224
$connection = $this->getConnection();
225225
$select = $connection->select()->from(
226226
$this->getMainTable(),

0 commit comments

Comments
 (0)