DONE: add env based checking for whatsapp before testing at staging
This commit is contained in:
@@ -54,10 +54,10 @@ class WhatsappPembiayaanOnlinePaid extends Job
|
||||
$storedPhone = $customer ? ($customer->telefon ?: $customer->telefon2) : null;
|
||||
$to = $client->normalizeMsisdn($storedPhone);
|
||||
|
||||
if (env('APP_ENV') !== 'production') {
|
||||
if (!config('whatsapp.whatsapp_cloud_enabled')) {
|
||||
$admin = $client->normalizeMsisdn(env('ADMIN_PHONE_NUMBER'));
|
||||
if (!$admin) {
|
||||
Log::warning('WhatsApp Cloud skipped: ADMIN_PHONE_NUMBER required when not production', [
|
||||
Log::warning('WhatsApp Cloud skipped: ADMIN_PHONE_NUMBER required when WHATSAPP_ENABLED is false', [
|
||||
'norujukan' => $this->norujukan,
|
||||
]);
|
||||
$this->logBlast($now, $storedPhone, 'skipped: ADMIN_PHONE_NUMBER empty');
|
||||
|
||||
Reference in New Issue
Block a user