option('con'); $param = isset($paramValue) ? $paramValue : $this->option('param'); //(new Slack(new Request(['title' => 'mConnect Webhook - Check 1', 'fields' => ['payload' => json_encode($param)], 'group' => Slack::$STAGE_TESTING])))->send(); if(!empty($con)) { switch ($con) { case 'NACH-Webhook': $id = Arr::get($param,'application_id',''); //(new Slack(new Request(['title' => 'mConnect Webhook - Check 2', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); if(!empty($id)) { //(new Slack(new Request(['title' => 'mConnect Webhook - Check 3', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); $merchantApiIntegration = (new VendorIntegrationController(new Request($param)))->push(); if($merchantApiIntegration) { return Utility::handlerSendSuccess([],Lang::get('message.jobs_success')); } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Failed to ExecuteJob']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Missing parameter ExecuteJob']]); } break; case 'RazorPay-Webhook': $id = Arr::get($param,'application_id',''); //(new Slack(new Request(['title' => 'mConnect Webhook - Check 2', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); if(!empty($id)) { //(new Slack(new Request(['title' => 'Razorpay webhook', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); $merchantApiIntegration = (new VendorIntegrationController(new Request($param)))->push(); if($merchantApiIntegration) { return Utility::handlerSendSuccess([],Lang::get('message.jobs_success')); } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Failed to ExecuteJob']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Missing parameter ExecuteJob']]); } break; case 'Paytm-Webhook': $id = Arr::get($param,'application_id',''); //(new Slack(new Request(['title' => 'mConnect Webhook - Check 2', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); if(!empty($id)) { //(new Slack(new Request(['title' => 'mConnect Webhook - Check 3', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); $merchantApiIntegration = (new VendorIntegrationController(new Request($param)))->push(); if($merchantApiIntegration) { return Utility::handlerSendSuccess([],Lang::get('message.jobs_success')); } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Failed to ExecuteJob']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Missing parameter ExecuteJob']]); } break; case 'Cashfree-Webhook': $id = Arr::get($param,'application_id',''); //(new Slack(new Request(['title' => 'mConnect Webhook - Check 2', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); if(!empty($id)) { //(new Slack(new Request(['title' => 'mConnect Webhook - Check 3', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); $merchantApiIntegration = (new VendorIntegrationController(new Request($param)))->push(); if($merchantApiIntegration) { return Utility::handlerSendSuccess([],Lang::get('message.jobs_success')); } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Failed to ExecuteJob']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Missing parameter ExecuteJob']]); } break; case 'Digio-VKYC-Webhook': $id = Arr::get($param,'application_id',''); //(new Slack(new Request(['title' => 'mConnect Webhook - Check 2', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); if(!empty($id)) { //(new Slack(new Request(['title' => 'mConnect Webhook - Check 3', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); $merchantApiIntegration = (new VendorIntegrationController(new Request($param)))->push(); if($merchantApiIntegration) { return Utility::handlerSendSuccess([],Lang::get('message.jobs_success')); } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Failed to ExecuteJob']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Missing parameter ExecuteJob']]); } break; case 'Application-Webhook': $id = Arr::get($param,'application_id',''); //(new Slack(new Request(['title' => 'mConnect Webhook - Check 2', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); if(!empty($id)) { //(new Slack(new Request(['title' => 'mConnect Webhook - Check 3', 'fields' => ['payload' => $id], 'group' => Slack::$STAGE_TESTING])))->send(); $merchantApiIntegration = (new VendorIntegrationController(new Request($param)))->push(); if($merchantApiIntegration) { return Utility::handlerSendSuccess([],Lang::get('message.jobs_success')); } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Failed to ExecuteJob']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Missing parameter ExecuteJob']]); } break; default: return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['No case found to handle in ExecuteJob']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Context is missing']]); } } }