Skip to content

Commit

Permalink
feat: Add bank information to payment reminder message
Browse files Browse the repository at this point in the history
  • Loading branch information
bangyadiii committed Jun 5, 2024
1 parent cc0f93c commit 01fdbaa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Console/Commands/PaymentReminderCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class PaymentReminderCommand extends Command
public function handle()
{
$template = Setting::where('key', 'whatsapp_template')->first()->value;
$bank = Setting::query()->where('key', 'rekening')->first()?->value ?? '';

$customers = Customer::with(['bills', 'plan'])
->where('service_status', ServiceStatus::ACTIVE)
Expand All @@ -51,6 +52,7 @@ public function handle()
'TARIFPAKET' => $customer->plan->price,
'TAGIHAN' => $customer->plan->price,
'ISOLIR' => $customer->isolir_date,
'BANK' => $bank,
];
$content = replacePlaceholder($template, $data);
$notification = new PaymentReminderNotification($customer->phone_number, $content);
Expand Down

0 comments on commit 01fdbaa

Please sign in to comment.