curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_1 = curl_exec($ch); curl_close($ch); } if($_FILES['upload_aadhaar_card_back']['name']!=''){ $tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name']; $file_type = $_FILES['upload_aadhaar_card_back']['type']; $file_name = basename($_FILES['upload_aadhaar_card_back']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_2 = curl_exec($ch); curl_close($ch); } if($_FILES['upload_pan_card_front']['name']!=''){ $tmp_file_name = $_FILES['upload_pan_card_front']['tmp_name']; $file_type = $_FILES['upload_pan_card_front']['type']; $file_name = basename($_FILES['upload_pan_card_front']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_3 = curl_exec($ch); curl_close($ch); } // if ($_FILES["upload_aadhaar_card_front"]["name"] != '') { // $upload_aadhaar_card_front = urlencode($_FILES["upload_aadhaar_card_front"]["name"]); // if (pathinfo($upload_aadhaar_card_front, PATHINFO_EXTENSION)=='pdf') { // $_SESSION['upload_aadhaar_card_front'] = rand('000000000000000','999999999999999').'.pdf'; // } // else{ // $_SESSION['upload_aadhaar_card_front'] = rand('000000000000000','999999999999999').'.jpeg'; // } // $upload_aadhaar_card_front_tmp = $_FILES["upload_aadhaar_card_front"]["tmp_name"]; // move_uploaded_file($upload_aadhaar_card_front_tmp, "uploads/msme/".$_SESSION['upload_aadhaar_card_front'].""); // $link_1 = ''.$cur_url.'/uploads/msme/'.$_SESSION["upload_aadhaar_card_front"].''; // } else { // $link_1 = ''; // } // if ($_FILES["upload_aadhaar_card_back"]["name"] != '') { // $upload_aadhaar_card_back = urlencode($_FILES["upload_aadhaar_card_back"]["name"]); // if (pathinfo($upload_aadhaar_card_back, PATHINFO_EXTENSION)=='pdf') { // $_SESSION['upload_aadhaar_card_back'] = rand('000000000000000','999999999999999').'.pdf'; // } // else{ // $_SESSION['upload_aadhaar_card_back'] = rand('000000000000000','999999999999999').'.jpeg'; // } // $upload_aadhaar_card_back_tmp = $_FILES["upload_aadhaar_card_back"]["tmp_name"]; // move_uploaded_file($upload_aadhaar_card_back_tmp, "uploads/msme/".$_SESSION['upload_aadhaar_card_back'].""); // $link_2 = ''.$cur_url.'/uploads/msme/'.$_SESSION["upload_aadhaar_card_back"].''; // } else { // $link_2 = ''; // } // if ($_FILES["upload_pan_card_front"]["name"] != '') { // $upload_pan_card_front = urlencode($_FILES["upload_pan_card_front"]["name"]); // if (pathinfo($upload_pan_card_front, PATHINFO_EXTENSION)=='pdf') { // $_SESSION['upload_pan_card_front'] = rand('000000000000000','999999999999999').'.pdf'; // } // else{ // $_SESSION['upload_pan_card_front'] = rand('000000000000000','999999999999999').'.jpeg'; // } // $upload_pan_card_front_tmp = $_FILES["upload_pan_card_front"]["tmp_name"]; // move_uploaded_file($upload_pan_card_front_tmp, "uploads/msme/".$_SESSION['upload_pan_card_front'].""); // $link_3 = ''.$cur_url.'/uploads/msme/'.$_SESSION["upload_pan_card_front"].''; // } else { // $link_3 = ''; // } $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; // For Proprietor if (($_POST['form_name'] == 'Udyam Online For Proprietor') && ($_POST['type_of_organisation'] == 'Proprietary')) { $product_price = 2700; } elseif (($_POST['form_name'] == 'Re Udyam Online For Proprietor')) { $product_price = 1999; } // For Partnership Firm elseif (($_POST['form_name'] == 'Udyam Online For Partnership Firm')) { $product_price = 2700; } elseif (($_POST['form_name'] == 'Re Udyam Online For Partnership Firm')) { $product_price = 1999; } // For Private Limited elseif (($_POST['form_name'] == 'Udyam Online For Private Limited')) { $product_price = 3999; } elseif (($_POST['form_name'] == 'Re Udyam Online For Private Limited')) { $product_price = 2700; } // For Public Limited elseif (($_POST['form_name'] == 'Udyam Online For Public Limited')) { $product_price = 4999; } elseif (($_POST['form_name'] == 'Re Udyam Online For Public Limited')) { $product_price = 2700; } // For Others elseif (($_POST['form_name'] == 'Udyam Online For Others')) { $product_price = 2700; } elseif (($_POST['form_name'] == 'Re Udyam Online For Others')) { $product_price = 1999; } elseif (($_POST['form_name'] == 'Print UAM Certificate')) { $product_price = 1999; } // Normal Udyam & Re Form elseif (($_POST['form_name'] == 'UDYAM Registration')) { $product_price = 2700; } elseif (($_POST['form_name'] == 'Re Registration')) { $product_price = 1999; } $sql=" INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, business_address, plant_state, plant_district, plant_pincode, office_address, office_state, office_district, office_pincode, annual_turnover, gender, social_category, physically_handicapped, aadhaar_number, uam_number, gstin_number, pan_card_number, bank_account_number, ifsc_code, business_name, date_of_commencement_of_business, type_of_organisation, main_business_activity_of_enterprise, additional_details_about_business, persons_employed_male, persons_employed_female, persons_employed_other, persons_employed_total, investment_in_plant_and_machinery, upload_aadhaar_card_front, upload_aadhaar_card_back, upload_pan_card_front, total_amount, payment_status, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["business_address"]."', '".$_POST["plant_state"]."', '".$_POST["plant_district"]."', '".$_POST["plant_pincode"]."', '".$_POST["office_address"]."', '".$_POST["office_state"]."', '".$_POST["office_district"]."', '".$_POST["office_pincode"]."', '".$_POST["annual_turnover"]."', '".$_POST["gender"]."', '".$_POST["social_category"]."', '".$_POST["physically_handicapped"]."', '".$_POST["aadhaar_number"]."', '".$_POST["uam_number"]."', '".$_POST["gstin_number"]."', '".$_POST["pan_card_number"]."', '".$_POST["bank_account_number"]."', '".$_POST["ifsc_code"]."', '".$_POST["business_name"]."', '".$_POST["date_of_commencement_of_business"]."', '".$_POST["type_of_organisation"]."', '".$_POST["main_business_activity_of_enterprise"]."', '".$_POST["additional_details_about_business"]."', '".$_POST["persons_employed_male"]."', '".$_POST["persons_employed_female"]."', '".$_POST["persons_employed_other"]."', '".$_POST["persons_employed_total"]."', '".$_POST["investment_in_plant_and_machinery"]."', '".$link_1."', '".$link_2."', '".$link_3."', '".$product_price."', '".$payment_status."', 'Checked' )"; 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://crm.techlounge.co.in/api.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.''); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $response = curl_exec($ch); // curl_close($ch); // $_SESSION["panel_form_id_1"] = $response; $form_name = urlencode($_POST["form_name"]); $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.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // Razorpay Payment $api = new Api($keyId, $keySecret); $orderData = [ 'receipt' => 3457, 'amount' => $product_price * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $api->order->create($orderData); $razorpayOrderId = $razorpayOrder['id']; $_SESSION['razorpay_order_id'] = $razorpayOrderId; $displayAmount = $amount = $orderData['amount']; if ($displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $keyId, "amount" => $amount, "name" => strtoupper($url1), "description" => $_POST['form_name'], "image" => "./assets/img/digital-india.png", "prefill" => [ "name" => $_POST['applicant_name'], "email" => $_POST['email_id'], "contact" => $_POST['mobile_number'], ], "notes" => [ "address" => "India", "merchant_order_id" => "EDSLlcJtsq4PGU", ], "theme" => [ "color" => "#2767dc" ], "order_id" => $razorpayOrderId, ]; if ($displayCurrency !== 'INR') { $data['display_currency'] = $displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); require("checkout/{$checkout}.php"); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = ''.$url1.''; $mail->SMTPAuth = true; $mail->Username = 'no-reply@'.$url1.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@'.$url1.'', "$website"); // $mail->addAddress("".$_POST["email_id"].""); // $mail->isHTML(true); // $mail->Subject = "Your ".$_POST["form_name"]." Form Submitted Successfully"; // $mail->Body = " // Dear ".$_POST["applicant_name"].", //

// Thank you for submitting your application for ".$_POST["form_name"]." on our website. //

// This mail is an acknowledgement of successful submission of your application, on our website. This mail does not confirm the // payment status against the submitted application. //

// Regards,
// Team Processing,
// For Order Status: order@udyog-adhaar.in // "; // $mail->send(); // $mail->ClearAllRecipients(); $mail->addAddress('no-reply@'.$url1.''); $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']."
PLANT ADDRESS: ".$_POST['business_address']."
PLANT STATE: ".$_POST['plant_state']."
PLANT DISTRICT: ".$_POST['plant_district']."
PLANT PINCODE: ".$_POST['plant_pincode']."
OFFICE ADDRESS: ".$_POST['office_address']."
OFFICE STATE: ".$_POST['office_state']."
OFFICE DISTRICT: ".$_POST['office_district']."
OFFICE PINCODE: ".$_POST['office_pincode']."
ANNUAL TURNOVER: ".$_POST['annual_turnover']."
GENDER: ".$_POST['gender']."
SOCIAL CATEGORY: ".$_POST['social_category']."
PHYSICALLY HANDICAPPED: ".$_POST['physically_handicapped']."
AADHAAR NUMBER: ".$_POST["aadhaar_number"]."
UAM NUMBER: ".$_POST["uam_number"]."
GSTIN NUMBER: ".$_POST["gstin_number"]."
PAN CARD NUMBER: ".$_POST['pan_card_number']."
BANK ACCOUNT NUMBER: ".$_POST['bank_account_number']."
IFSC CODE: ".$_POST['ifsc_code']."
BUSINESS NAME: ".$_POST['business_name']."
DATE OF COMMENCEMENT OF BUSINESS: ".$_POST['date_of_commencement_of_business']."
TYPE OF ORGANISATION: ".$_POST['type_of_organisation']."
MAIN BUSINESS ACTIVITY OF ENTERPRISE: ".$_POST['main_business_activity_of_enterprise']."
ADDITIONAL DETAILS ABOUT BUSINESS: ".$_POST['additional_details_about_business']."
PERSONS EMPLOYED (MALE): ".$_POST['persons_employed_male']."
PERSONS EMPLOYED (FEMALE): ".$_POST['persons_employed_female']."
PERSONS EMPLOYED (OTHER): ".$_POST['persons_employed_other']."
PERSONS EMPLOYED (TOTAL): ".$_POST['persons_employed_total']."
INVESTMENT IN PLANT AND MACHINERY (AMOUNT IN LACS): ".$_POST['investment_in_plant_and_machinery']."
AADHAAR CARD - FRONT SIDE: ".$link_1."
AADHAAR CARD - BACK SIDE: ".$link_2."
PAN CARD - FRONT SIDE: ".$link_3." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } // Print Udyam Application if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'print_udyam_application') ) { $cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ; $url = "https://uploadnow.xyz/index.php"; if($_FILES['upload_aadhaar_card_front']['name']!=''){ $tmp_file_name = $_FILES['upload_aadhaar_card_front']['tmp_name']; $file_type = $_FILES['upload_aadhaar_card_front']['type']; $file_name = basename($_FILES['upload_aadhaar_card_front']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_1 = curl_exec($ch); curl_close($ch); } $link_2 = ''; $url = "https://uploadnow.xyz/index.php"; $tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name']; $file_type = $_FILES['upload_aadhaar_card_back']['type']; $file_name = basename($_FILES['upload_aadhaar_card_back']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_2 = curl_exec($ch); curl_close($ch); // if ($_FILES["upload_aadhaar_card_front"]["name"] != '') { // $upload_aadhaar_card_front = urlencode($_FILES["upload_aadhaar_card_front"]["name"]); // if (pathinfo($upload_aadhaar_card_front, PATHINFO_EXTENSION)=='pdf') { // $_SESSION['upload_aadhaar_card_front'] = rand('000000000000000','999999999999999').'.pdf'; // } // else{ // $_SESSION['upload_aadhaar_card_front'] = rand('000000000000000','999999999999999').'.jpeg'; // } // $upload_aadhaar_card_front_tmp = $_FILES["upload_aadhaar_card_front"]["tmp_name"]; // move_uploaded_file($upload_aadhaar_card_front_tmp, "uploads/msme/".$_SESSION['upload_aadhaar_card_front'].""); // $link_1 = ''.$cur_url.'/uploads/msme/'.$_SESSION["upload_aadhaar_card_front"].''; // } else { // $link_1 = ''; // } $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $sql = " SELECT product_price FROM product_lists WHERE product_name = '".$_POST["form_id"]."'; "; $result = $conn->query($sql); $row = $result->fetch_assoc(); $product_price = $row["product_price"]; $sql=" INSERT INTO msme_form ( form_name, udyam_number, applicant_name, mobile_number, email_id, opt_selected, upload_aadhaar_card_front, upload_aadhaar_card_back, updated_details, total_amount, payment_status, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["udyam_number"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["opt_selected"]."', '".$link_1."', '".$link_2."', '".$_POST["updated_details"]."', '".$product_price."', '".$payment_status."', 'Checked' )"; 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://crm.techlounge.co.in/api.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.''); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $response = curl_exec($ch); // curl_close($ch); // $_SESSION["panel_form_id_1"] = $response; $form_name = urlencode($_POST["form_name"]); $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.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // Razorpay Payment $api = new Api($keyId, $keySecret); $orderData = [ 'receipt' => 3457, 'amount' => $product_price * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $api->order->create($orderData); $razorpayOrderId = $razorpayOrder['id']; $_SESSION['razorpay_order_id'] = $razorpayOrderId; $displayAmount = $amount = $orderData['amount']; if ($displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $keyId, "amount" => $amount, "name" => strtoupper($url1), "description" => $_POST['form_name'], "image" => "./assets/img/digital-india.png", "prefill" => [ "name" => $_POST['applicant_name'], "email" => $_POST['email_id'], "contact" => $_POST['mobile_number'], ], "notes" => [ "address" => "India", "merchant_order_id" => "EDSLlcJtsq4PGU", ], "theme" => [ "color" => "#2767dc" ], "order_id" => $razorpayOrderId, ]; if ($displayCurrency !== 'INR') { $data['display_currency'] = $displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); require("checkout/{$checkout}.php"); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = ''.$url1.''; $mail->SMTPAuth = true; $mail->Username = 'no-reply@'.$url1.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@'.$url1.'', "$website"); // $mail->addAddress("".$_POST["email_id"].""); // $mail->isHTML(true); // $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; // $mail->Body = " // Dear ".$_POST["applicant_name"].", //

// Thank you for submitting your application for ".$_POST["form_name"]." on our website. //

// This mail is an acknowledgement of successful submission of your application, on our website. This mail does not confirm the // payment status against the submitted application. //

// Regards,
// Team Processing,
// For Order Status: order@udyog-adhaar.in // "; // $mail->send(); // $mail->ClearAllRecipients(); $mail->addAddress('no-reply@'.$url1.''); $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']."
UDYAM NUMBER: ".$_POST["udyam_number"]." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } // Update Udyam Certificate if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'update_udyam_certificate') ) { $cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ; $url = "https://uploadnow.xyz/index.php"; if($_FILES['upload_aadhaar_card_front']['name']!=''){ $tmp_file_name = $_FILES['upload_aadhaar_card_front']['tmp_name']; $file_type = $_FILES['upload_aadhaar_card_front']['type']; $file_name = basename($_FILES['upload_aadhaar_card_front']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_1 = curl_exec($ch); curl_close($ch); } $link_2 = ''; $url = "https://uploadnow.xyz/index.php"; $tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name']; $file_type = $_FILES['upload_aadhaar_card_back']['type']; $file_name = basename($_FILES['upload_aadhaar_card_back']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_2 = curl_exec($ch); curl_close($ch); // if ($_FILES["upload_aadhaar_card_front"]["name"] != '') { // $upload_aadhaar_card_front = urlencode($_FILES["upload_aadhaar_card_front"]["name"]); // if (pathinfo($upload_aadhaar_card_front, PATHINFO_EXTENSION)=='pdf') { // $_SESSION['upload_aadhaar_card_front'] = rand('000000000000000','999999999999999').'.pdf'; // } // else{ // $_SESSION['upload_aadhaar_card_front'] = rand('000000000000000','999999999999999').'.jpeg'; // } // $upload_aadhaar_card_front_tmp = $_FILES["upload_aadhaar_card_front"]["tmp_name"]; // move_uploaded_file($upload_aadhaar_card_front_tmp, "uploads/msme/".$_SESSION['upload_aadhaar_card_front'].""); // $link_1 = ''.$cur_url.'/uploads/msme/'.$_SESSION["upload_aadhaar_card_front"].''; // } else { // $link_1 = ''; // } $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $sql = " SELECT product_price FROM product_lists WHERE product_name = '".$_POST["form_id"]."'; "; $result = $conn->query($sql); $row = $result->fetch_assoc(); $product_price = $row["product_price"]; $sql=" INSERT INTO msme_form ( form_name, udyam_number, applicant_name, mobile_number, email_id, opt_selected, upload_aadhaar_card_front, upload_aadhaar_card_back, updated_details, total_amount, payment_status, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["udyam_number"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["opt_selected"]."', '".$link_1."', '".$link_2."', '".$_POST["updated_details"]."', '".$product_price."', '".$payment_status."', 'Checked' )"; 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://crm.techlounge.co.in/api.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.''); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $response = curl_exec($ch); // curl_close($ch); // $_SESSION["panel_form_id_1"] = $response; $form_name = urlencode($_POST["form_name"]); $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.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // Razorpay Payment $api = new Api($keyId, $keySecret); $orderData = [ 'receipt' => 3457, 'amount' => $product_price * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $api->order->create($orderData); $razorpayOrderId = $razorpayOrder['id']; $_SESSION['razorpay_order_id'] = $razorpayOrderId; $displayAmount = $amount = $orderData['amount']; if ($displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $keyId, "amount" => $amount, "name" => strtoupper($url1), "description" => $_POST['form_name'], "image" => "./assets/img/digital-india.png", "prefill" => [ "name" => $_POST['applicant_name'], "email" => $_POST['email_id'], "contact" => $_POST['mobile_number'], ], "notes" => [ "address" => "India", "merchant_order_id" => "EDSLlcJtsq4PGU", ], "theme" => [ "color" => "#2767dc" ], "order_id" => $razorpayOrderId, ]; if ($displayCurrency !== 'INR') { $data['display_currency'] = $displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); require("checkout/{$checkout}.php"); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = ''.$url1.''; $mail->SMTPAuth = true; $mail->Username = 'no-reply@'.$url1.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@'.$url1.'', "$website"); // $mail->addAddress("".$_POST["email_id"].""); // $mail->isHTML(true); // $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; // $mail->Body = " // Dear ".$_POST["applicant_name"].", //

// Thank you for submitting your application for ".$_POST["form_name"]." on our website. //

// This mail is an acknowledgement of successful submission of your application, on our website. This mail does not confirm the // payment status against the submitted application. //

// Regards,
// Team Processing,
// For Order Status: order@udyog-adhaar.in // "; // $mail->send(); // $mail->ClearAllRecipients(); $mail->addAddress('no-reply@'.$url1.''); $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']."
UDYAM NUMBER: ".$_POST["udyam_number"]." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } // Print Udyam Certificate if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'print_udyam_registration')&& (isset($_POST['toso']) && ($_POST['toso']=="on")) ) { $link_2 = ''; $url = "https://uploadnow.xyz/index.php"; $tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name']; $file_type = $_FILES['upload_aadhaar_card_back']['type']; $file_name = basename($_FILES['upload_aadhaar_card_back']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_2 = curl_exec($ch); curl_close($ch); $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $sql = " SELECT product_price FROM product_lists WHERE product_name = '".$_POST["form_id"]."'; "; $result = $conn->query($sql); $row = $result->fetch_assoc(); $product_price = $row["product_price"]; $sql=" INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, uam_number, aadhaar_number, upload_aadhaar_card_back, total_amount, payment_status, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$_POST["aadhaar_number"]."', '".$link_2."', '".$product_price."', '".$payment_status."', 'Checked' )"; 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://crm.techlounge.co.in/api.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.''); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $response = curl_exec($ch); // curl_close($ch); // $_SESSION["panel_form_id_1"] = $response; $form_name = urlencode($_POST["form_name"]); $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.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // Razorpay Payment $api = new Api($keyId, $keySecret); $orderData = [ 'receipt' => 3457, 'amount' => $product_price * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $api->order->create($orderData); $razorpayOrderId = $razorpayOrder['id']; $_SESSION['razorpay_order_id'] = $razorpayOrderId; $displayAmount = $amount = $orderData['amount']; if ($displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $keyId, "amount" => $amount, "name" => strtoupper($url1), "description" => $_POST['form_name'], "image" => "./assets/img/digital-india.png", "prefill" => [ "name" => $_POST['applicant_name'], "email" => $_POST['email_id'], "contact" => $_POST['mobile_number'], ], "notes" => [ "address" => "India", "merchant_order_id" => "EDSLlcJtsq4PGU", ], "theme" => [ "color" => "#2767dc" ], "order_id" => $razorpayOrderId, ]; if ($displayCurrency !== 'INR') { $data['display_currency'] = $displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); require("checkout/{$checkout}.php"); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = ''.$url1.''; $mail->SMTPAuth = true; $mail->Username = 'no-reply@'.$url1.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@'.$url1.'', "$website"); // $mail->addAddress("".$_POST["email_id"].""); // $mail->isHTML(true); // $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; // $mail->Body = " // Dear ".$_POST["applicant_name"].", //

// Thank you for submitting your application for ".$_POST["form_name"]." on our website. //

// This mail is an acknowledgement of successful submission of your application, on our website. This mail does not confirm the // payment status against the submitted application. //

// Regards,
// Team Processing,
// For Order Status: order@udyog-adhaar.in // "; // $mail->send(); // $mail->ClearAllRecipients(); $mail->addAddress('no-reply@'.$url1.''); $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']."
UAM NUMBER: ".$_POST["uam_number"]."
AADHAAR CARD ".$_POST["aadhaar_number"]."
"; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } // Trace Udyam if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'trace_udyam_registration')&& (isset($_POST['tos1']) && ($_POST['tos1']=="on")) ) { $link_2 = ''; $url = "https://uploadnow.xyz/index.php"; $tmp_file_name = $_FILES['upload_aadhaar_card_back']['tmp_name']; $file_type = $_FILES['upload_aadhaar_card_back']['type']; $file_name = basename($_FILES['upload_aadhaar_card_back']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_2 = curl_exec($ch); curl_close($ch); $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $sql = " SELECT product_price FROM product_lists WHERE product_name = '".$_POST["form_id"]."'; "; $result = $conn->query($sql); $row = $result->fetch_assoc(); $product_price = $row["product_price"]; $sql=" INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, uam_number, aadhaar_number, upload_aadhaar_card_back, total_amount, payment_status, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$_POST["aadhaar_number"]."', '".$link_2."', '".$product_price."', '".$payment_status."', 'Checked' )"; 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://crm.techlounge.co.in/api.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.''); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $response = curl_exec($ch); // curl_close($ch); // $_SESSION["panel_form_id_1"] = $response; $form_name = urlencode($_POST["form_name"]); $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.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // Razorpay Payment $api = new Api($keyId, $keySecret); $orderData = [ 'receipt' => 3457, 'amount' => $product_price * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $api->order->create($orderData); $razorpayOrderId = $razorpayOrder['id']; $_SESSION['razorpay_order_id'] = $razorpayOrderId; $displayAmount = $amount = $orderData['amount']; if ($displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $keyId, "amount" => $amount, "name" => strtoupper($url1), "description" => $_POST['form_name'], "image" => "./assets/img/digital-india.png", "prefill" => [ "name" => $_POST['applicant_name'], "email" => $_POST['email_id'], "contact" => $_POST['mobile_number'], ], "notes" => [ "address" => "India", "merchant_order_id" => "EDSLlcJtsq4PGU", ], "theme" => [ "color" => "#2767dc" ], "order_id" => $razorpayOrderId, ]; if ($displayCurrency !== 'INR') { $data['display_currency'] = $displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); require("checkout/{$checkout}.php"); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->isSMTP(); $mail->Host = ''.$url1.''; $mail->SMTPAuth = true; $mail->Username = 'no-reply@'.$url1.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@'.$url1.'', "$website"); $mail->addAddress("".$_POST["email_id"].""); $mail->isHTML(true); $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; $mail->Body = " Dear ".$_POST["applicant_name"].",

Thank you for submitting your application for ".$_POST["form_name"]." on our website.

This mail is an acknowledgement of successful submission of your application, on our website. This mail does not confirm the payment status against the submitted application.

Regards,
Team Processing,
For Order Status: order@udyog-adhaar.in "; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress('no-reply@'.$url1.''); $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']."
UAM NUMBER: ".$_POST["uam_number"]."
AADHAAR NUMBER: ".$_POST["aadhaar_number"]." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } // echo ""; // echo ""; } // Update Certificate if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'update_certificate') ) { $cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ; $url = "https://uploadnow.xyz/index.php"; if($_FILES['upload_aadhaar_card_front']['name']!=''){ $tmp_file_name = $_FILES['upload_aadhaar_card_front']['tmp_name']; $file_type = $_FILES['upload_aadhaar_card_front']['type']; $file_name = basename($_FILES['upload_aadhaar_card_front']['name']); $post_data = array( 'file' => curl_file_create($tmp_file_name, $file_type, $file_name) ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $link_1 = curl_exec($ch); curl_close($ch); } // if ($_FILES["upload_aadhaar_card_front"]["name"] != '') { // $upload_aadhaar_card_front = urlencode($_FILES["upload_aadhaar_card_front"]["name"]); // if (pathinfo($upload_aadhaar_card_front, PATHINFO_EXTENSION)=='pdf') { // $_SESSION['upload_aadhaar_card_front'] = rand('000000000000000','999999999999999').'.pdf'; // } // else{ // $_SESSION['upload_aadhaar_card_front'] = rand('000000000000000','999999999999999').'.jpeg'; // } // $upload_aadhaar_card_front_tmp = $_FILES["upload_aadhaar_card_front"]["tmp_name"]; // move_uploaded_file($upload_aadhaar_card_front_tmp, "uploads/msme/".$_SESSION['upload_aadhaar_card_front'].""); // $link_1 = ''.$cur_url.'/uploads/msme/'.$_SESSION["upload_aadhaar_card_front"].''; // } else { // $link_1 = ''; // } $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $sql = " SELECT product_price FROM product_lists WHERE product_name = '".$_POST["form_id"]."'; "; $result = $conn->query($sql); $row = $result->fetch_assoc(); $product_price = $row["product_price"]; $sql=" INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, uam_number, upload_aadhaar_card_front, updated_details, total_amount, payment_status, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$link_1."', '".$_POST["updated_details"]."', '".$product_price."', '".$payment_status."', 'Checked' )"; 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://crm.techlounge.co.in/api.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.''); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $response = curl_exec($ch); // curl_close($ch); // $_SESSION["panel_form_id_1"] = $response; $form_name = urlencode($_POST["form_name"]); $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.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // Razorpay Payment $api = new Api($keyId, $keySecret); $orderData = [ 'receipt' => 3457, 'amount' => $product_price * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $api->order->create($orderData); $razorpayOrderId = $razorpayOrder['id']; $_SESSION['razorpay_order_id'] = $razorpayOrderId; $displayAmount = $amount = $orderData['amount']; if ($displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $keyId, "amount" => $amount, "name" => strtoupper($url1), "description" => $_POST['form_name'], "image" => "./assets/img/digital-india.png", "prefill" => [ "name" => $_POST['applicant_name'], "email" => $_POST['email_id'], "contact" => $_POST['mobile_number'], ], "notes" => [ "address" => "India", "merchant_order_id" => "EDSLlcJtsq4PGU", ], "theme" => [ "color" => "#2767dc" ], "order_id" => $razorpayOrderId, ]; if ($displayCurrency !== 'INR') { $data['display_currency'] = $displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); require("checkout/{$checkout}.php"); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = ''.$url1.''; $mail->SMTPAuth = true; $mail->Username = 'no-reply@'.$url1.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@'.$url1.'', "$website"); // $mail->addAddress("".$_POST["email_id"].""); // $mail->isHTML(true); // $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; // $mail->Body = " // Dear ".$_POST["applicant_name"].", //

// Thank you for submitting your application for ".$_POST["form_name"]." on our website. //

// This mail is an acknowledgement of successful submission of your application, on our website. This mail does not confirm the // payment status against the submitted application. //

// Regards,
// Team Processing,
// For Order Status: order@udyog-adhaar.in // "; // $mail->send(); // $mail->ClearAllRecipients(); $mail->addAddress('no-reply@'.$url1.''); $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']."
UAM NUMBER: ".$_POST["uam_number"]."
AADHAAR CARD - FRONT SIDE: ".$link_1."
"; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } // Print Certificate if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'print_certificate') ) { $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $sql = " SELECT product_price FROM product_lists WHERE product_name = '".$_POST["form_id"]."'; "; $result = $conn->query($sql); $row = $result->fetch_assoc(); $product_price = $row["product_price"]; $sql=" INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, uam_number, total_amount, payment_status, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$product_price."', '".$payment_status."', 'Checked' )"; 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://crm.techlounge.co.in/api.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.''); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $response = curl_exec($ch); // curl_close($ch); // $_SESSION["panel_form_id_1"] = $response; $form_name = urlencode($_POST["form_name"]); $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.'&state='.$state.'&formName='.$form_name.'&solNumber='.urlencode($_POST["sol_number"]).''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // Razorpay Payment $api = new Api($keyId, $keySecret); $orderData = [ 'receipt' => 3457, 'amount' => $product_price * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $api->order->create($orderData); $razorpayOrderId = $razorpayOrder['id']; $_SESSION['razorpay_order_id'] = $razorpayOrderId; $displayAmount = $amount = $orderData['amount']; if ($displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $keyId, "amount" => $amount, "name" => strtoupper($url1), "description" => $_POST['form_name'], "image" => "./assets/img/digital-india.png", "prefill" => [ "name" => $_POST['applicant_name'], "email" => $_POST['email_id'], "contact" => $_POST['mobile_number'], ], "notes" => [ "address" => "India", "merchant_order_id" => "EDSLlcJtsq4PGU", ], "theme" => [ "color" => "#2767dc" ], "order_id" => $razorpayOrderId, ]; if ($displayCurrency !== 'INR') { $data['display_currency'] = $displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); require("checkout/{$checkout}.php"); // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->isSMTP(); $mail->Host = ''.$url1.''; $mail->SMTPAuth = true; $mail->Username = 'no-reply@'.$url1.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@'.$url1.'', "$website"); // $mail->addAddress("".$_POST["email_id"].""); // $mail->isHTML(true); // $mail->Subject = "Your ".$_POST["form_name"]." Submitted Successfully"; // $mail->Body = " // Dear ".$_POST["applicant_name"].", //

// Thank you for submitting your application for ".$_POST["form_name"]." on our website. //

// This mail is an acknowledgement of successful submission of your application, on our website. This mail does not confirm the // payment status against the submitted application. //

// Regards,
// Team Processing,
// For Order Status: order@udyog-adhaar.in // "; // $mail->send(); // $mail->ClearAllRecipients(); $mail->addAddress('no-reply@'.$url1.''); $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']."
UAM NUMBER: ".$_POST["uam_number"]." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } // } ?>