Skip to content

Commit 1724ce3

Browse files
committed
MAGETWO-38902: Payment\Gateway update
- added methods to Payment model - fixed assertion message
1 parent 31bba13 commit 1724ce3

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

app/code/Magento/Payment/Gateway/Helper/ContextHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function assertOrderPayment(InfoInterface $paymentInfo)
3333
public static function assertQuotePayment(InfoInterface $paymentInfo)
3434
{
3535
if (!$paymentInfo instanceof \Magento\Quote\Model\Quote\Payment) {
36-
throw new \LogicException('Order payment should be provided.');
36+
throw new \LogicException('Quote payment should be provided.');
3737
}
3838
}
3939
}

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2785,5 +2785,28 @@ public function getIsFraudDetected()
27852785
return (bool)$this->getData('is_fraud_detected');
27862786
}
27872787

2788+
/**
2789+
* Sets whether should close parent transaction
2790+
*
2791+
* @param int|bool $flag
2792+
* @return $this
2793+
*/
2794+
public function setShouldCloseParentTransaction($flag)
2795+
{
2796+
$this->setData('should_close_parent_transaction', (bool)$flag);
2797+
return $this;
2798+
}
2799+
2800+
/**
2801+
* Whether should close parent transaction
2802+
*
2803+
* @return bool
2804+
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
2805+
*/
2806+
public function getShouldCloseParentTransaction()
2807+
{
2808+
return (bool)$this->getData('should_close_parent_transaction');
2809+
}
2810+
27882811
//@codeCoverageIgnoreEnd
27892812
}

0 commit comments

Comments
 (0)