Skip to content

Commit

Permalink
[PIPRES-526] optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijusCoding committed Jan 10, 2025
1 parent a61cd49 commit 24adcd5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions controllers/front/return.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,7 @@ protected function processGetStatus()

$transactionId = $dbPayment['transaction_id'] ?: Tools::getValue('transaction_id');

if (!$dbPayment || !isset($transactionId)) {
exit(json_encode([
'success' => false,
]));
}
if (!isset($dbPayment['cart_id']) || !Validate::isLoadedObject($cart = new Cart($dbPayment['cart_id']))) {
if (!isset($dbPayment) || !\Validate::isLoadedObject($cart = new Cart((int) Tools::getValue('cart_id')))) {
exit(json_encode([
'success' => false,
]));
Expand Down

0 comments on commit 24adcd5

Please sign in to comment.