tambah nama cawangan dalam notifikasi wasap setelah pembayaran disahkan oleh account
This commit is contained in:
@@ -294,6 +294,9 @@ class AccountController extends Controller
|
||||
$user_notelbimbit = $request->notel_pembida;
|
||||
$user_namapembida = $request->nama_pembida;
|
||||
|
||||
$getkodcaw = Cawangan::where('caw_code', $request->kodcaw)->select('caw_name')->first();
|
||||
$user_cawname = $getkodcaw->caw_name;
|
||||
|
||||
|
||||
if($request->jenis_button == 'tidaksah'){
|
||||
//insert loguser
|
||||
@@ -335,7 +338,7 @@ class AccountController extends Controller
|
||||
$bidder->status_payment = 1;
|
||||
$bidder->update();
|
||||
}
|
||||
WhatsappPengesahanPembida::dispatch($user_notelbimbit,$user_namapembida);
|
||||
WhatsappPengesahanPembida::dispatch($user_notelbimbit,$user_namapembida,$user_cawname);
|
||||
|
||||
//insert loguser
|
||||
$loguser = new LogUser;
|
||||
|
||||
@@ -21,6 +21,7 @@ class WhatsappPengesahanPembida implements ShouldQueue
|
||||
|
||||
public $user_notelbimbit;
|
||||
public $user_namapembida;
|
||||
public $user_cawname;
|
||||
|
||||
// protected $notisid;
|
||||
// protected $cawid;
|
||||
@@ -30,10 +31,11 @@ class WhatsappPengesahanPembida implements ShouldQueue
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($user_notelbimbit,$user_namapembida)
|
||||
public function __construct($user_notelbimbit,$user_namapembida,$user_cawname)
|
||||
{
|
||||
$this->user_notelbimbit = $user_notelbimbit;
|
||||
$this->user_namapembida = $user_namapembida;
|
||||
$this->user_cawname = $user_cawname;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,7 +46,7 @@ class WhatsappPengesahanPembida implements ShouldQueue
|
||||
public function handle()
|
||||
{
|
||||
$mobile_no = ltrim($this->user_notelbimbit, '+');
|
||||
$message = 'AR-RAHN PKB: Terima Kasih '.$this->user_namapembida .', Pembayaran Anda Telah Disahkan, Sila Ke Cawangan Berkenaan Untuk Tuntutan Barang Bidaan Anda Hari Ini.';
|
||||
$message = 'AR-RAHN PKB: Terima Kasih '.$this->user_namapembida .', Pembayaran Bidaan Anda Untuk Cawangan *'.$this->user_cawname.'* Telah Disahkan, Sila Ke Cawangan Berkenaan Untuk Tuntutan Barang Bidaan Anda Hari Ini.';
|
||||
if(config('app.env') != 'production'){
|
||||
$mobile_no = config('app.admin_phone_number');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user