diff --git a/app/Nova/Actions/Sber/SyncWithSystem.php b/app/Nova/Actions/Sber/SyncWithSystem.php index 35a5a8c..df73e4a 100644 --- a/app/Nova/Actions/Sber/SyncWithSystem.php +++ b/app/Nova/Actions/Sber/SyncWithSystem.php @@ -48,6 +48,13 @@ class SyncWithSystem extends Action $response = checkOnlinePayment($onlinePaymentResource->orderId, $result['username'], $result['password']); + if ($response['errCode'] != 0) { + return Action::modal('modal-response', [ + 'title' => 'HALKBANK API', + 'body' => $response['errorMessage'], + ]); + } + $systemRawResponse = syncWithBankSystem( online_payment_order_uuid: $onlinePaymentResource->orderId, bank_unique_code: $sberPaymentOrder->branch->unique_code,