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=UDYAMREGISTER.IN&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"] = $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" => "UDYAM REGISTRATION", "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 = 'udyamregister.in'; $mail->SMTPAuth = true; $mail->Username = 'no-reply@udyamregister.in'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom("no-reply@udyamregister.in", "Udyam Registration"); $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@udyamregister.in "; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress("no-reply@udyamregister.in"); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " AADHAAR NUMBER : ".$_POST["aadhaar_number"]."
APPLICANT NAME : ".$_POST["applicant_name"]."
ORGANISATION TYPE : ".$_POST["organisation_type"]."
HAVE PAN OR NOT : ".$_POST["have_pan"]."
PAN NUMBER : ".$_POST["pan_number"]."
MOBILE NUMBER : ".$_POST["mobile_number"]."
EMAIL ID : ".$_POST["email_id"]."
SOCIAL CATEGORY : ".$_POST["social_category"]."
GENDER : ".$_POST["gender"]."
PHYSICALLY HANDICAPPED : ".$_POST["physically_handicapped"]."
ENTERPRISE NAME : ".$_POST["name_of_enterprise"]."
FLAT / BLOCK : ".$_POST["flat_door_block_no"]."
PERMISES BUILDING NAME : ".$_POST["name_of_premises_building"]."
VILLAGE / TOWN : ".$_POST["village_or_town"]."
BLOCK : ".$_POST["block"]."
STREET : ".$_POST["road_or_street"]."
CITY : ".$_POST["city"]."
PINCODE : ".$_POST["pin"]."
STATE : ".$_POST["state"]."
DISTRICT : ".$_POST["district"]."
OFFICIAL FLAT / BLOCK : ".$_POST["official_flat_door_block_no"]."
OFFICIAL PERMISES BUILDING NAME : ".$_POST["official_name_of_premises_building"]."
OFFICIAL VILLAGE / TOWN : ".$_POST["official_village_or_town"]."
OFFICIAL BLOCK : ".$_POST["official_block"]."
OFFICIAL STREET : ".$_POST["official_road_or_street"]."
OFFICIAL CITY : ".$_POST["official_city"]."
OFFICIAL PINCODE : ".$_POST["official_pin"]."
OFFICIAL STATE : ".$_POST["official_state"]."
OFFICIAL DISTRICT : ".$_POST["official_district"]."
PREVIOUS UAM /EM2 REGISTRATION : ".$_POST["registration"]."
EM2 / UAM NUMBER : ".$_POST["specify"]."
CORPORATION DATE : ".$_POST["date_of_corporation"]."
PRODUCTION / BUSINESS COMMENCED : ".$_POST["production"]."
DATE OF COMMENCEMENT : ".$_POST["date_of_commencement_of_business"]."
BANK NAME : ".$_POST["bank_name"]."
IFSC CODE : ".$_POST["ifsc_code"]."
BANK A/C NUMBER : ".$_POST["bank_account_number"]."
NUMBER OF EMPLOYED MALE : ".$_POST["persons_employed_male"]."
NUMBER OF EMPLOYED FEMALE : ".$_POST["persons_employed_female"]."
NUMBER OF EMPLOYED OTHER : ".$_POST["persons_employed_other"]."
NUMBER OF EMPLOYED TOTAL : ".$_POST["persons_employed_total"]."
DEPRICIATED COST : ".$_POST["depreciated_cost"]."
EXCLUSION OF COST : ".$_POST["exclusion_of_cost"]."
NET INVESTMENT : ".$_POST["net_investment"]."
TOTAL TURNOVER : ".$_POST["total_turnover"]."
EXPORT TURNOVER : ".$_POST["export_turnover"]."
NET TURNOVER : ".$_POST["net_turnover"]."
"; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } if( (isset($_POST['form_id'])&& $_POST['form_id'] == 'instant_udyam_registration') ) { $_SESSION['table_id'] = 'msme_form'; $payment_status = 'Unpaid'; $product_price = 3700; $sql=" INSERT INTO msme_form ( form_name, aadhaar_number, applicant_name, organisation_type, have_pan, pan_number, mobile_number, email_id, social_category, gender, physically_handicapped, name_of_enterprise, flat_door_block_no, name_of_premises_building, village_or_town, block, road_or_street, city, pin, state, district, official_flat_door_block_no, official_name_of_premises_building, official_village_or_town, official_block, official_road_or_street, official_city, official_pin, official_state, official_district, registration, specify, date_of_corporation, production, date_of_commencement_of_business, bank_name, ifsc_code, bank_account_number, persons_employed_male, persons_employed_female, persons_employed_other, persons_employed_total, depreciated_cost, exclusion_of_cost, net_investment, total_turnover, export_turnover, net_turnover, total_amount, payment_status, form_created_on, terms_of_service ) VALUES ( '".$_POST["form_name"]."', '".$_POST["aadhaar_number"]."', '".$_POST["applicant_name"]."', '".$_POST["organisation_type"]."', '".$_POST["have_pan"]."', '".$_POST["pan_number"]."', '".$_POST["mobile_number"]."', '".$_POST["email_id"]."', '".$_POST["social_category"]."', '".$_POST["gender"]."', '".$_POST["physically_handicapped"]."', '".$_POST["name_of_enterprise"]."', '".$_POST["flat_door_block_no"]."', '".$_POST["name_of_premises_building"]."', '".$_POST["village_or_town"]."', '".$_POST["block"]."', '".$_POST["road_or_street"]."', '".$_POST["city"]."', '".$_POST["pin"]."', '".$_POST["state"]."', '".$_POST["district"]."', '".$_POST["official_flat_door_block_no"]."', '".$_POST["official_name_of_premises_building"]."', '".$_POST["official_village_or_town"]."', '".$_POST["official_block"]."', '".$_POST["official_road_or_street"]."', '".$_POST["official_city"]."', '".$_POST["official_pin"]."', '".$_POST["official_state"]."', '".$_POST["official_district"]."', '".$_POST["registration"]."', '".$_POST["specify"]."', '".$_POST["date_of_corporation"]."', '".$_POST["production"]."', '".$_POST["date_of_commencement_of_business"]."', '".$_POST["bank_name"]."', '".$_POST["ifsc_code"]."', '".$_POST["bank_account_number"]."', '".$_POST["persons_employed_male"]."', '".$_POST["persons_employed_female"]."', '".$_POST["persons_employed_other"]."', '".$_POST["persons_employed_total"]."', '".$_POST["depreciated_cost"]."', '".$_POST["exclusion_of_cost"]."', '".$_POST["net_investment"]."', '".$_POST["total_turnover"]."', '".$_POST["export_turnover"]."', '".$_POST["net_turnover"]."', '".$product_price."', '".$payment_status."', '".$date."', '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=UDYAMREGISTER.IN&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); // 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" => "UDYAM REGISTRATION", "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 = 'udyamregister.in'; $mail->SMTPAuth = true; $mail->Username = 'no-reply@udyamregister.in'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom("no-reply@udyamregister.in", "Udyam Registration"); $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@udyamregister.in "; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress("no-reply@udyamregister.in"); $mail->isHTML(true); $mail->Subject = "New ".$_POST["form_name"]." Form Submitted"; $mail->Body = " AADHAAR NUMBER : ".$_POST["aadhaar_number"]."
APPLICANT NAME : ".$_POST["applicant_name"]."
ORGANISATION TYPE : ".$_POST["organisation_type"]."
HAVE PAN OR NOT : ".$_POST["have_pan"]."
PAN NUMBER : ".$_POST["pan_number"]."
MOBILE NUMBER : ".$_POST["mobile_number"]."
EMAIL ID : ".$_POST["email_id"]."
SOCIAL CATEGORY : ".$_POST["social_category"]."
GENDER : ".$_POST["gender"]."
PHYSICALLY HANDICAPPED : ".$_POST["physically_handicapped"]."
ENTERPRISE NAME : ".$_POST["name_of_enterprise"]."
FLAT / BLOCK : ".$_POST["flat_door_block_no"]."
PERMISES BUILDING NAME : ".$_POST["name_of_premises_building"]."
VILLAGE / TOWN : ".$_POST["village_or_town"]."
BLOCK : ".$_POST["block"]."
STREET : ".$_POST["road_or_street"]."
CITY : ".$_POST["city"]."
PINCODE : ".$_POST["pin"]."
STATE : ".$_POST["state"]."
DISTRICT : ".$_POST["district"]."
OFFICIAL FLAT / BLOCK : ".$_POST["official_flat_door_block_no"]."
OFFICIAL PERMISES BUILDING NAME : ".$_POST["official_name_of_premises_building"]."
OFFICIAL VILLAGE / TOWN : ".$_POST["official_village_or_town"]."
OFFICIAL BLOCK : ".$_POST["official_block"]."
OFFICIAL STREET : ".$_POST["official_road_or_street"]."
OFFICIAL CITY : ".$_POST["official_city"]."
OFFICIAL PINCODE : ".$_POST["official_pin"]."
OFFICIAL STATE : ".$_POST["official_state"]."
OFFICIAL DISTRICT : ".$_POST["official_district"]."
PREVIOUS UAM /EM2 REGISTRATION : ".$_POST["registration"]."
EM2 / UAM NUMBER : ".$_POST["specify"]."
CORPORATION DATE : ".$_POST["date_of_corporation"]."
PRODUCTION / BUSINESS COMMENCED : ".$_POST["production"]."
DATE OF COMMENCEMENT : ".$_POST["date_of_commencement_of_business"]."
BANK NAME : ".$_POST["bank_name"]."
IFSC CODE : ".$_POST["ifsc_code"]."
BANK A/C NUMBER : ".$_POST["bank_account_number"]."
NUMBER OF EMPLOYED MALE : ".$_POST["persons_employed_male"]."
NUMBER OF EMPLOYED FEMALE : ".$_POST["persons_employed_female"]."
NUMBER OF EMPLOYED OTHER : ".$_POST["persons_employed_other"]."
NUMBER OF EMPLOYED TOTAL : ".$_POST["persons_employed_total"]."
DEPRICIATED COST : ".$_POST["depreciated_cost"]."
EXCLUSION OF COST : ".$_POST["exclusion_of_cost"]."
NET INVESTMENT : ".$_POST["net_investment"]."
TOTAL TURNOVER : ".$_POST["total_turnover"]."
EXPORT TURNOVER : ".$_POST["export_turnover"]."
NET TURNOVER : ".$_POST["net_turnover"]."
"; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } } ?>