This commit is contained in:
nurmuhammet committed 2025-09-09 17:03:49 +05:00
1 parent 71e0f1c18d
commit 9cecd6c465
2 files changed
+8 -4

No files matched your search

+1 -2
View File
@@ -472,8 +472,7 @@ function syncWithBankSystem(
return (string) $res->getBody();
} catch (Exception $e) {
Log::error($e);
info([$e->getMessage(), $e->getTraceAsString()]);
return null;
}
}
+7 -2
View File
@@ -65,6 +65,13 @@ public function handle(ActionFields $fields, Collection $models)
pay_purpose: $orderItem->created_at->translatedFormat('F').' '.$orderItem->created_at->format('Y')
);
if ($systemRawResponse == null) {
return Action::modal('modal-response', [
'title' => 'SYSTEM API',
'body' => 'Connection issue to SYSTEM',
]);
}
$systemResponse = json_decode($systemRawResponse);
$success = false;
@@ -75,8 +82,6 @@ public function handle(ActionFields $fields, Collection $models)
$success = $systemResponse['errCode'] == 0;
}
info(['s' => $systemResponse]);
$orderItem->update([
'synced_with_system' => $success,
]);