wip
This commit is contained in:
@@ -472,8 +472,7 @@ function syncWithBankSystem(
|
||||
|
||||
return (string) $res->getBody();
|
||||
} catch (Exception $e) {
|
||||
Log::error($e);
|
||||
|
||||
info([$e->getMessage(), $e->getTraceAsString()]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,13 @@ class SyncWithSystem extends Action
|
||||
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 @@ class SyncWithSystem extends Action
|
||||
$success = $systemResponse['errCode'] == 0;
|
||||
}
|
||||
|
||||
info(['s' => $systemResponse]);
|
||||
|
||||
$orderItem->update([
|
||||
'synced_with_system' => $success,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user