wac webhook

This commit is contained in:
edmondlang
2024-07-18 23:11:04 +08:00
parent aa65b333c8
commit e5d6f3f581
6 changed files with 195 additions and 3 deletions
@@ -169,16 +169,17 @@ class CreateCustomerLogic extends AbstractControllerLogic
CreatePerfexCRMCustomer::dispatch($createLeadPerfexCRMObject);
}
if(!app()->environment(['production'])){
if(app()->environment(['production'])){
// call wac webhook
$url = 'https://wacontact.readyspace.com/rest/trigger/9fe03daf-2ace-4095-b064-601ef6d9bfe7';
$url = config('wagWebhookUrl.account_registration_url');
$payload = [
'name' => $request->input('name'),
'email' => $request->input('email'),
'phone' => $request->input('phone'),
'portal' => 'izyim'
];
$response = Http::post($url, $payload);
Log::channel('wac_webhook')->info(json_encode($response));
Log::channel('wac_webhook')->info('Register Account: ' . json_encode($response));
}
// $this->generateEmailVerificationAttemptProcessor->execute($user);