Skip to content

Commit 3d33aa3

Browse files
Merge pull request #127 from buckaroo-it/feature/BP-658-pending-orders
BP-658 Magento 2 - orders with pending status after paid push
2 parents 6502d3e + 21cfca2 commit 3d33aa3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Model/Push.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,9 +1356,6 @@ protected function saveInvoice()
13561356

13571357
$this->logging->addDebug(__METHOD__ . '|20|');
13581358

1359-
$this->order->setIsInProcess(true);
1360-
$this->order->save();
1361-
13621359
$transactionKey = $this->getTransactionKey();
13631360

13641361
if (strlen($transactionKey) <= 0) {
@@ -1373,6 +1370,9 @@ protected function saveInvoice()
13731370

13741371
if (!empty($this->postData['brq_invoicenumber'])) {
13751372
if ($this->groupTransaction->isGroupTransaction($this->postData['brq_invoicenumber'])) {
1373+
1374+
$this->logging->addDebug(__METHOD__ . '|27|');
1375+
13761376
$invoice->setGrandTotal($invoice->getGrandTotal() + $this->order->getBuckarooAlreadyPaid());
13771377
$invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() + $this->order->getBaseBuckarooAlreadyPaid());
13781378
$invoice->setState(2);
@@ -1387,6 +1387,11 @@ protected function saveInvoice()
13871387
}
13881388
}
13891389

1390+
$this->logging->addDebug(__METHOD__ . '|35|');
1391+
1392+
$this->order->setIsInProcess(true);
1393+
$this->order->save();
1394+
13901395
$this->dontSaveOrderUponSuccessPush = true;
13911396

13921397
return true;

0 commit comments

Comments
 (0)