DONE: update whatsapp message template
Build Docker Image / build-backend (push) Successful in 17s

This commit is contained in:
ISMAIL MASSERAN
2026-09-27 15:57:50 +08:00
parent 1076ecbaf2
commit 583d936fd2
3 changed files with 16 additions and 13 deletions
+3 -2
View File
@@ -31,11 +31,12 @@ class WhatsappTestSend extends Command
$bodyParams = [];
if (strtolower($template) !== 'hello_world') {
// pembiayaan_online_paid: SAG, amaun, bank, 4 digit akhir, tarikh, rujukan
$bodyParams = [
'Tampoi',
'TEST-SAG',
'100.00',
'Maybank ****1234',
'Maybank',
'1234',
date('d/m/Y'),
'TEST-REF',
];
+10 -8
View File
@@ -96,27 +96,29 @@ class WhatsappPembiayaanOnlinePaid extends Job
}
/**
* Matches pembiayaan_online_paid body: cawangan, SAG, amaun, akaun, tarikh, rujukan.
* Matches Meta template pembiayaan_online_paid (ms):
* AR-RAHN KoPKB: Pembiayaan bagi No. SAG *{{1}}* sebanyak *RM{{2}}*
* telah berjaya dikreditkan ke akaun *{{3}}* berakhir *{{4}}* pada *{{5}}*.
* Rujukan: *{{6}}*
*
* {{1}} SAG, {{2}} amaun, {{3}} nama bank/akaun, {{4}} 4 digit akhir, {{5}} tarikh, {{6}} rujukan bayaran
*
* @return array<int,string>
*/
protected function bodyParams()
{
$akaun = trim((string) $this->namaBank);
$bank = trim((string) $this->namaBank);
$tail = $this->accountTail($this->noakaun);
if ($tail !== '') {
$akaun = trim($akaun . ' ' . $tail);
}
$tarikh = $this->tarikhBayaran
? Carbon::parse($this->tarikhBayaran)->format('d/m/Y')
: Carbon::now()->format('d/m/Y');
return [
$this->cawName ?: $this->kodcaw,
$this->norujukan ?: '-',
number_format((float) $this->pinjaman, 2, '.', ''),
$akaun !== '' ? $akaun : '-',
$bank !== '' ? $bank : '-',
$tail !== '' ? $tail : '-',
$tarikh,
$this->noRujukanBayaran ?: '-',
];
@@ -129,7 +131,7 @@ class WhatsappPembiayaanOnlinePaid extends Job
return '';
}
return '****' . substr($digits, -4);
return substr($digits, -4);
}
protected function logBlast($now, $telefon, $status)