@@ -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;
|
||||
|
||||
@@ -71,12 +71,12 @@ class AutoTamatLelong implements ShouldQueue
|
||||
if(config('app.env') != 'production'){
|
||||
$mobile_no = config('app.admin_phone_number');
|
||||
}
|
||||
$response = Http::get(env('WABOT_API'), [
|
||||
$response = Http::get(config('app.wabot_api'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => 'Lelongan Telah Tamat, Sila Jana Pemenang',
|
||||
'instance_id' => env('WABOT_INSTANCES_ID'),
|
||||
'access_token' => env('WABOT_TOKEN_KEYS')
|
||||
'instance_id' => config('app.wabot_instances_id'),
|
||||
'access_token' => config('app.wabot_token_keys')
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,12 +151,12 @@ Terima Kasih';
|
||||
if(config('app.env') != 'production'){
|
||||
$mobile_no = config('app.admin_phone_number');
|
||||
}
|
||||
$response = Http::get(env('WABOT_API'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => env('WABOT_INSTANCES_ID'),
|
||||
'access_token' => env('WABOT_TOKEN_KEYS')
|
||||
$response = Http::get(config('app.wabot_api'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => config('app.wabot_instances_id'),
|
||||
'access_token' => config('app.wabot_token_keys')
|
||||
]);
|
||||
|
||||
Log::info("WABOT - Notis Lelongan Fasa 1" . $response);
|
||||
|
||||
@@ -151,12 +151,12 @@ Terima Kasih';
|
||||
if(config('app.env') != 'production'){
|
||||
$mobile_no = config('app.admin_phone_number');
|
||||
}
|
||||
$response = Http::get(env('WABOT_API'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => env('WABOT_INSTANCES_ID'),
|
||||
'access_token' => env('WABOT_TOKEN_KEYS')
|
||||
$response = Http::get(config('app.wabot_api'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => config('app.wabot_instances_id'),
|
||||
'access_token' => config('app.wabot_token_keys')
|
||||
]);
|
||||
|
||||
Log::info("WABOT - Notis Lelongan Fasa 2" . $response);
|
||||
|
||||
@@ -159,12 +159,12 @@ Sekian, terima kasih.';
|
||||
if(config('app.env') != 'production'){
|
||||
$mobile_no = config('app.admin_phone_number');
|
||||
}
|
||||
$response = Http::get(env('WABOT_API'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => env('WABOT_INSTANCES_ID'),
|
||||
'access_token' => env('WABOT_TOKEN_KEYS')
|
||||
$response = Http::get(config('app.wabot_api'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => config('app.wabot_instances_id'),
|
||||
'access_token' => config('app.wabot_token_keys')
|
||||
]);
|
||||
|
||||
Log::info("WABOT - notis peringatan kedua " . $response);
|
||||
|
||||
@@ -152,12 +152,12 @@ Terima Kasih';
|
||||
if(config('app.env') != 'production'){
|
||||
$mobile_no = config('app.admin_phone_number');
|
||||
}
|
||||
$response = Http::get(env('WABOT_API'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => env('WABOT_INSTANCES_ID'),
|
||||
'access_token' => env('WABOT_TOKEN_KEYS')
|
||||
$response = Http::get(config('app.wabot_api'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => config('app.wabot_instances_id'),
|
||||
'access_token' => config('app.wabot_token_keys')
|
||||
]);
|
||||
|
||||
Log::info("WABOT - Notis Tuntutan Baki Lelong" . $response);
|
||||
|
||||
@@ -54,12 +54,12 @@ class WhatsappPemenang implements ShouldQueue
|
||||
if(config('app.env') != 'production'){
|
||||
$mobile_no = config('app.admin_phone_number');
|
||||
}
|
||||
$response = Http::get(env('WABOT_API'), [
|
||||
$response = Http::get(config('app.wabot_api'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => env('WABOT_INSTANCES_ID'),
|
||||
'access_token' => env('WABOT_TOKEN_KEYS')
|
||||
'instance_id' => config('app.wabot_instances_id'),
|
||||
'access_token' => config('app.wabot_token_keys')
|
||||
]);
|
||||
|
||||
Log::info("WABOT - menang bidaan " . $response);
|
||||
|
||||
@@ -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,16 +46,16 @@ 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');
|
||||
}
|
||||
$response = Http::get(env('WABOT_API'), [
|
||||
$response = Http::get(config('app.wabot_api'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => $message,
|
||||
'instance_id' => env('WABOT_INSTANCES_ID'),
|
||||
'access_token' => env('WABOT_TOKEN_KEYS')
|
||||
'instance_id' => config('app.wabot_instances_id'),
|
||||
'access_token' => config('app.wabot_token_keys')
|
||||
]);
|
||||
|
||||
Log::info("WABOT - Akaun Telah Sahkan Pembayaran: ".$this->user_namapembida .'' . $response);
|
||||
|
||||
@@ -45,12 +45,12 @@ class WhatsappTidakSahBayaran implements ShouldQueue
|
||||
if(config('app.env') != 'production'){
|
||||
$mobile_no = config('app.admin_phone_number');
|
||||
}
|
||||
$response = Http::get(env('WABOT_API'), [
|
||||
$response = Http::get(config('app.wabot_api'), [
|
||||
'number' => $mobile_no,
|
||||
'type' => 'text',
|
||||
'message' => 'Bayaran Pembida yang bernama *'.$this->user_namapembida.'* Adalah *Tidak Sah*, Mohon Pihak AJK Lelong Untuk Buat Semakan, Terima Kasih.' ,
|
||||
'instance_id' => env('WABOT_INSTANCES_ID'),
|
||||
'access_token' => env('WABOT_TOKEN_KEYS')
|
||||
'instance_id' => config('app.wabot_instances_id'),
|
||||
'access_token' => config('app.wabot_token_keys')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,6 +247,12 @@ return [
|
||||
|
||||
'api_ujrah_url' => env('API_UJRAH_URL', 'http://localhost'),
|
||||
|
||||
'wabot_api' => env('WABOT_API', 'http://localhost'),
|
||||
|
||||
'wabot_instances_id' => env('WABOT_INSTANCES_ID', 'null'),
|
||||
|
||||
'wabot_token_keys' => env('WABOT_TOKEN_KEYS', 'null'),
|
||||
|
||||
'api_verify' => env('API_VERIFY', true),
|
||||
|
||||
'api_url_kaunter' => env('API_URL_KAUNTER', 'http://localhost'),
|
||||
|
||||
Reference in New Issue
Block a user