alert('Incorrect verification code');" ;
echo "";
die();
}
else{
//uydam cantilation
if ((isset($_POST['form_name']))&&(isset($_POST['form_id']))&&($_POST['form_name']=="UDYAM Cancellation")&&($_POST['form_id']=="udyam_cancellation")){
$applicant_name = urlencode($_POST['applicant_name']);
$mobile_number = urlencode($_POST['mobile_number']);
$email_id = urlencode($_POST['email_id']);
$form_name = urlencode($_POST['form_name']);
//cancel reason togle
if(isset($_POST['cancel_reason_text'])){$cancelreason=$_POST['cancel_reason_text'];}else{$cancelreason=$_POST['cancel_reason'];}
$_SESSION['table_id'] = 'msme_form';
$payment_status = 'Unpaid';
// price of udaym canceletion
$product_price = 2700;
$sql="
INSERT INTO msme_form (
form_name,
applicant_name,
mobile_number,
email_id,
aadhaar_number,
udyam_number,
business_name,
total_amount,
payment_status,
order_id,
terms_of_service,
cancel_reason,
office_state,
form_created_on
)
VALUES (
'".$_POST["form_name"]."',
'".$_POST["applicant_name"]."',
'".$_POST["mobile_number"]."',
'".$_POST["email_id"]."',
'".$_POST["aadhaar_number"]."',
'".$_POST["udyam_number"]."',
'".$_POST["business_name"]."',
'".$product_price."',
'".$payment_status."',
'".$orderId."',
'Checked',
'".$cancelreason."',
'".$_POST["office_state"]."',
'".$date."'
)";
if(!$result = $conn->query($sql)){
die('There was an error running the query [' . $conn->error . ']');
}
else
{
$_SESSION["form_id"] = $conn->insert_id;
$ch = curl_init('https://crm11.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.$form_name.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_11"] = $response;
$ch = curl_init('https://crm2.techlounge.co.in/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=MSME&website='.$crm_website.'&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.$form_name.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$_SESSION["panel_form_id_2"] = $response;
// Payment Gateway Redirection
if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'CASHFREE') {
include_once('./cashfree/request.php');
} else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'ATOM') {
include_once('./atom/submit.php');
} else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'PAYU') {
include_once('./payu/payu-submit.php');
} else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'RAZORPAY') {
include_once('./razorpay/razorpay-submit.php');
} else if (defined('PAYMENT_GATEWAY') && $currentPaymentGateway == 'INSTAMOJO') {
include_once('./instamojo/submit.php');
}
// Mailer
$host_name = $_SERVER['HTTP_HOST'];
$website_name = strtoupper($host_name);
$mail = new PHPMailer(true);
try {
$mail->isSMTP();
// $mail->SMTPDebug = 2;
$mail->Host = $host_name;
$mail->SMTPAuth = true;
$mail->Username = 'order@'.$host_name.'';
$mail->Password = 'freeDOM@611#';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->setFrom('order@'.$host_name.'', $website_name);
$mail->addAddress($_POST["email_id"]);
$mail->isHTML(true);
$mail->Subject = "New ".$_POST["form_name"]." Form Submitted";
$mail->Body = "
APPLICANT NAME: ".$_POST["applicant_name"]."
MOBILE NUMBER: ".$_POST['mobile_number']."
EMAIL ID: ".$_POST['email_id']."
BUSINESS NAME: ".$_POST["business_name"]."
AADHAAR NUMBER: ".$_POST["aadhaar_number"]."
UDYAM NUMBER: ".$_POST["udyam_number"]."
CANCELLATION REASON: ".$_POST['cancel_reason']."
TOTAL AMOUNT: ".$product_price."
";
$mail->send();
}
catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
include_once('./client-email.php');
//after submiting...
die();
}
}
?>