Skip to content

Commit

Permalink
skip if status is done
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyraul committed May 18, 2020
1 parent 8cbd06b commit bfc44c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Model/Atol/Vendor.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,14 @@ public function saveCallback($response)

throw new \Exception("Transaction not found. Uuid: {$response->getUuid()}");
}

$entity = $this->transactionHelper->getEntityByTransaction($transaction);

$status = $transaction->getKkmStatus();
if ($status === Response::STATUS_DONE) {
return $entity;
}

switch ($entity->getEntityType()) {
case 'invoice':
$txn = $this->transactionHelper->saveSellTransaction($entity, $response);
Expand Down

0 comments on commit bfc44c4

Please sign in to comment.