Файловый менеджер - Редактировать - /home/d46091/udyog-adhaar.in/test1.php
Назад
<?php include_once('./config.php'); include_once('./vendor/autoload.php'); include_once('./validate-special.php'); session_start(); function generate($length = 7) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; $token = ''; while(strlen($token) < $length) { $token .= $chars[mt_rand(0, strlen($chars) - 1)]; } return 'ORDER_' . $token; } use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; $applicant_name = urlencode($_POST['applicant_name']); $mobile_number = urlencode($_POST['mobile_number']); $email_id = urlencode($_POST['email_id']); if(isset($_POST['state'])) { $state = urlencode($_POST['state']); } elseif(isset($_POST['office_state'])) { $state = urlencode($_POST['office_state']); }else{ $state = '-'; } $crm_website = strtoupper($_SERVER['SERVER_NAME']); $url1 = 'udyog-adhaar.in'; $webpath = pathinfo($url1, PATHINFO_FILENAME); $website = strtoupper($webpath); // Udyam Registration if (isset($_POST['tos']) && ($_POST['tos'] == "on")) { $cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ; $link_1 = ''; $link_2 = ''; $link_3 = ''; $url = "https://msmeindia.xyz/index.php"; $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); $url = "https://msmeindia.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 (isset($_FILES['upload_pan_card_front']['name'])) { $url = "https://msmeindia.xyz/index.php"; $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); } $_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"]; $orderId = generate(13); // 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, order_id, 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."', '".$orderId."', 'Checked' ) "; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); $sql_update_msme_form = 'UPDATE msme_form SET order_id = "'.$orderId.'" WHERE id = "'.$_SESSION['form_id'].'"'; $result_update_msme_form = $conn->query($sql_update_msme_form); ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> PLANT ADDRESS: ".$_POST['business_address']."<br> PLANT STATE: ".$_POST['plant_state']."<br> PLANT DISTRICT: ".$_POST['plant_district']."<br> PLANT PINCODE: ".$_POST['plant_pincode']."<br> OFFICE ADDRESS: ".$_POST['office_address']."<br> OFFICE STATE: ".$_POST['office_state']."<br> OFFICE DISTRICT: ".$_POST['office_district']."<br> OFFICE PINCODE: ".$_POST['office_pincode']."<br> ANNUAL TURNOVER: ".$_POST['annual_turnover']."<br> GENDER: ".$_POST['gender']."<br> SOCIAL CATEGORY: ".$_POST['social_category']."<br> PHYSICALLY HANDICAPPED: ".$_POST['physically_handicapped']."<br> AADHAAR NUMBER: ".$_POST["aadhaar_number"]."<br> UAM NUMBER: ".$_POST["uam_number"]."<br> GSTIN NUMBER: ".$_POST["gstin_number"]."<br> PAN CARD NUMBER: ".$_POST['pan_card_number']."<br> BANK ACCOUNT NUMBER: ".$_POST['bank_account_number']."<br> IFSC CODE: ".$_POST['ifsc_code']."<br> BUSINESS NAME: ".$_POST['business_name']."<br> DATE OF COMMENCEMENT OF BUSINESS: ".$_POST['date_of_commencement_of_business']."<br> TYPE OF ORGANISATION: ".$_POST['type_of_organisation']."<br> MAIN BUSINESS ACTIVITY OF ENTERPRISE: ".$_POST['main_business_activity_of_enterprise']."<br> ADDITIONAL DETAILS ABOUT BUSINESS: ".$_POST['additional_details_about_business']."<br> PERSONS EMPLOYED (MALE): ".$_POST['persons_employed_male']."<br> PERSONS EMPLOYED (FEMALE): ".$_POST['persons_employed_female']."<br> PERSONS EMPLOYED (OTHER): ".$_POST['persons_employed_other']."<br> PERSONS EMPLOYED (TOTAL): ".$_POST['persons_employed_total']."<br> INVESTMENT IN PLANT AND MACHINERY (AMOUNT IN LACS): ".$_POST['investment_in_plant_and_machinery']."<br> AADHAAR CARD - FRONT SIDE: ".$link_1."<br> AADHAAR CARD - BACK SIDE: ".$link_2."<br> PAN CARD - FRONT SIDE: ".$link_3." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } // Udyam Form Ads Link if (isset($_POST['tos2']) && ($_POST['tos2'] == "on")) { $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $sql = " SELECT product_price FROM product_lists WHERE product_name = '".$_POST["type_of_organisation"]."'; "; $result = $conn->query($sql); $row = $result->fetch_assoc(); $product_price = $row["product_price"]; $orderId = generate(13); $sql = " INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, total_amount, payment_status, order_id, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$product_price."', '".$payment_status."', '".$orderId."', 'Checked' ) "; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // $response = curl_exec($ch); // curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); $sql_update_msme_form = 'UPDATE msme_form SET order_id = "'.$orderId.'" WHERE id = "'.$_SESSION['form_id'].'"'; $result_update_msme_form = $conn->query($sql_update_msme_form); ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> "; $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://msmeindia.xyz/index.php"; $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 = ''; $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'; $orderId = generate(13); $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, order_id, terms_of_service, office_state ) 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."', '".$orderId."', 'Checked', '".$_POST["office_state"]."' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> 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://msmeindia.xyz/index.php"; $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 = ''; $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'; $orderId = generate(13); $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, order_id, terms_of_service, office_state ) 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."', '".$orderId."', 'Checked', '".$_POST["office_state"]."' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> 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"))) { $_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"]; $orderId = generate(13); $sql = " INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, uam_number, aadhaar_number, total_amount, payment_status, order_id, terms_of_service, office_state ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$_POST["aadhaar_number"]."', '".$product_price."', '".$payment_status."', '".$orderId."', 'Checked', '".$_POST["office_state"]."' ) "; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> UAM NUMBER: ".$_POST["uam_number"]."<br> AADHAAR CARD ".$_POST["aadhaar_number"]."<br> "; $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"))){ $url = "https://msmeindia.xyz/index.php"; $link_2 = ''; $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"]; $orderId = generate(13); $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, order_id, terms_of_service, office_state ) 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."', '".$orderId."', 'Checked', '".$_POST["office_state"]."' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); // ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> UAM NUMBER: ".$_POST["uam_number"]."<br> AADHAAR NUMBER: ".$_POST["aadhaar_number"]." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } echo "<script>alert('Thanks For submiting your application form, Our Website is under upgradation process, we will get back soon to serve you better. Inconvenience is regretted.')</script>"; echo "<script>setTimeout(\"location.href = './';\",300);</script>"; } // 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://msmeindia.xyz/index.php"; $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); $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $orderId = generate(13); $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, order_id, terms_of_service, office_state ) 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."', '".$orderId."', 'Checked', '".$_POST["office_state"]."' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> UAM NUMBER: ".$_POST["uam_number"]."<br> AADHAAR CARD - FRONT SIDE: ".$link_1."<br> "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } // Update Certificate if((isset($_POST['form_id'])&& $_POST['form_id'] == 'trace_certificate')) { // $cur_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] ; // $url = "https://msmeindia.xyz/index.php"; // $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); $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $orderId = generate(13); $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, order_id, terms_of_service, office_state ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$product_price."', '".$payment_status."', '".$orderId."', 'Checked', '".$_POST["office_state"]."' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> UAM NUMBER: ".$_POST["uam_number"]."<br> AADHAAR CARD - FRONT SIDE: ".$link_1."<br> "; $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')) { // $link_2 = ''; // $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"]; $orderId = generate(13); $sql=" INSERT INTO msme_form ( form_name, applicant_name, mobile_number, email_id, uam_number, total_amount, payment_status, order_id, terms_of_service, office_state ) VALUES ( '".$_POST["form_name"]."', '".$_POST["applicant_name"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["uam_number"]."', '".$product_price."', '".$payment_status."', '".$orderId."', 'Checked', '".$_POST["office_state"]."' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { $_SESSION["form_id"] = $conn->insert_id; $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.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // post data $customerName = $_POST['applicant_name']; $customerPhone = $_POST['mobile_number']; $customerEmail = $_POST['email_id']; $orderAmount = $product_price; $orderCurrency = "INR"; // cashfree payment $secretKey = CASHFREE_KEY_SECRET; $postData = array( "appId" => CASHFREE_APP_ID, "orderId" => $orderId, "orderAmount" => $orderAmount, "orderCurrency" => $orderCurrency, "customerName" => $customerName, "customerPhone" => $customerPhone, "customerEmail" => $customerEmail, "returnUrl" => RETURN_URL, "notifyUrl" => NOTIFY_URL, ); // get secret key from your config ksort($postData); $signatureData = ""; foreach ($postData as $key => $value) { $signatureData .= $key.$value; } $signature = hash_hmac('sha256', $signatureData, $secretKey, true); $signature = base64_encode($signature); ?> <form id="redirectForm" method="post" action="<?php echo REQUEST_URL; ?>"> <input type="hidden" name="appId" value="<?php echo CASHFREE_APP_ID; ?>"/> <input type="hidden" name="orderId" value="<?php echo $orderId; ?>"/> <input type="hidden" name="orderAmount" value="<?php echo $orderAmount; ?>"/> <input type="hidden" name="orderCurrency" value="<?php echo $orderCurrency; ?>"/> <input type="hidden" name="customerName" value="<?php echo $customerName; ?>"/> <input type="hidden" name="customerEmail" value="<?php echo $customerEmail; ?>"/> <input type="hidden" name="customerPhone" value="<?php echo $customerPhone; ?>"/> <input type="hidden" name="returnUrl" value="<?php echo RETURN_URL; ?>"/> <input type="hidden" name="notifyUrl" value="<?php echo NOTIFY_URL; ?>"/> <input type="hidden" name="signature" value="<?php echo $signature; ?>"/> </form> <script>document.getElementById("redirectForm").submit();</script> <?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('no-reply@'.$url1.''); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " APPLICANT NAME: ".$_POST["applicant_name"]."<br> MOBILE NUMBER: ".$_POST['mobile_number']."<br> EMAIL ID: ".$_POST['email_id']."<br> UAM NUMBER: ".$_POST["uam_number"]." "; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка