128 $this->transactionAdditionalInfo =
$value;
137 $this->transactionAdditionalInfo[$key] =
$value;
146 unset($this->payment);
147 unset($this->document);
149 unset($this->message);
150 unset($this->transactionId);
151 $this->failSafe =
false;
152 $this->transactionAdditionalInfo = [];
163 if ($this->payment) {
164 if ($this->payment->getSkipTransactionCreation()) {
165 $this->payment->unsTransactionId();
179 $transaction = $this->transactionRepository->getByTransactionId(
180 $this->transactionId,
181 $this->payment->getId(),
182 $this->order->getId()
185 $transaction = $this->transactionRepository->create()->setTxnId($this->transactionId);
189 ->setOrderId($this->order->getId())
192 ->isFailsafe($this->failSafe);
194 if ($this->payment->hasIsTransactionClosed()) {
195 $transaction->setIsClosed((
int)$this->payment->getIsTransactionClosed());
197 if ($this->transactionAdditionalInfo) {
198 foreach ($this->transactionAdditionalInfo as $key =>
$value) {
202 $this->transactionAdditionalInfo = [];
204 $this->payment->setLastTransId(
$transaction->getTxnId());
207 if ($this->document && $this->document instanceof
AbstractModel) {
208 $this->document->setTransactionId(
$transaction->getTxnId());
224 $parentTransactionId = $this->payment->getParentTransactionId();
226 if ($parentTransactionId) {
228 if ($this->payment->getShouldCloseParentTransaction()) {
229 $parentTransaction = $this->transactionRepository->getByTransactionId(
230 $parentTransactionId,
231 $this->payment->getid(),
232 $this->order->getId()
234 if ($parentTransaction) {
235 if (!$parentTransaction->getIsClosed()) {
236 $parentTransaction->isFailsafe($this->failSafe)->close(
false);
238 $this->order->addRelatedObject($parentTransaction);
setPayment(OrderPaymentInterface $payment)
addAdditionalInformation($key, $value)
setAdditionalInformation(array $value)
setOrder(OrderInterface $order)
setTransactionId($transactionId)
linkWithParentTransaction(TransactionInterface $transaction)
__construct(TransactionRepositoryInterface $transactionRepository)
$transactionAdditionalInfo
setSalesDocument(\Magento\Sales\Model\AbstractModel $document)