This commit is contained in:
2025-09-10 13:29:39 +05:00
parent a5e086237e
commit 6dab1a38c6
4 changed files with 37 additions and 8 deletions

View File

@@ -448,12 +448,12 @@ function syncWithBankSystem(
$payPurpose = $pay_purpose;
$client = new Client([
'timeout' => 5, // seconds before it fails
'connect_timeout' => 1 // seconds to wait for connection
'timeout' => 5, // seconds before it fails
'connect_timeout' => 1, // seconds to wait for connection
]);
$headers = [
'Content-Type' => 'application/json',
'Authorization' => 'Basic YWRtaW46UUFad3N4MTIz'
'Authorization' => 'Basic YWRtaW46UUFad3N4MTIz',
];
$body = sprintf('{
"ecomId": "%s",
@@ -473,6 +473,7 @@ function syncWithBankSystem(
return (string) $res->getBody();
} catch (Exception $e) {
info([$e->getMessage(), $e->getTraceAsString()]);
return null;
}
}