Файловый менеджер - Редактировать - /home/d46091/foodlicenceportal.net/lost-fssai-certificate-submit.php
Назад
<?php require("config-test.php"); date_default_timezone_set('Asia/Kolkata'); $date=date('d-m-Y H:i:s'); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; function generate($length = 7) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; $token = ''; while(strlen($token) < $length) { $token .= $chars[mt_rand(0, strlen($chars) - 1)]; } return 'ORDER_' . $token; } // STATE $state = urlencode($_POST['office_state']); $orderId = generate(13); $applicant_name = urlencode($_POST['applicant_name']); $mobile_number = urlencode($_POST['mobile_number']); $email_id = urlencode($_POST['email_id']); $crm_website = 'foodlicenceportal.net'; $licence_type = $_POST['licence_type']; if($licence_type == 'Registration'){ $product_price = 2999; }elseif($licence_type == 'State License'){ $product_price = 3999; }elseif($licence_type == 'Central License'){ $product_price = 4999; }elseif($licence_type == ''){ $product_price = 5999; } if((isset($_POST['form_id'])&& $_POST['form_id'] == 'Trace_lost_fssai_certificate')) { // ini_set('display_errors', 1); // ini_set('display_startup_errors', 1); // error_reporting(E_ALL); $payment_status = 'Unpaid'; $sql = "INSERT INTO fssai ( form_name, applicant_name, email_id, mobile_number, licence_type, business_name, business_address, pincode, state, district, have_licence, total_amount, payment_status, order_id, form_created_on ) VALUES ( '" . mysqli_real_escape_string($conn, $_POST["form_name"]) . "', '" . mysqli_real_escape_string($conn, $_POST["applicant_name"]) . "', '" . mysqli_real_escape_string($conn, $_POST["email_id"]) . "', '" . mysqli_real_escape_string($conn, $_POST["mobile_number"]) . "', '" . mysqli_real_escape_string($conn, $_POST["licence_type"]) . "', '" . mysqli_real_escape_string($conn, $_POST["business_name"]) . "', '" . mysqli_real_escape_string($conn, $_POST["office_address"]) . "', '" . mysqli_real_escape_string($conn, $_POST["pincode"]) . "', '" . mysqli_real_escape_string($conn, $_POST["office_state"]) . "', '" . mysqli_real_escape_string($conn, $_POST["office_district"]) . "', '" . mysqli_real_escape_string($conn, $_POST["check_licence"]) . "', '" . mysqli_real_escape_string($conn, $product_price) . "', '" . mysqli_real_escape_string($conn, $payment_status) . "', '" . mysqli_real_escape_string($conn, $orderId) . "', '" . mysqli_real_escape_string($conn, $date) . "' )"; if(!$result = $conn->query($sql)){ die('There was an error running the query [' . $conn->error . ']'); } else { // echo $product_price; $_SESSION["form_id"] = $conn->insert_id; $form_name = urlencode($_POST["form_name"]); $api_url = "https://demolounge.in/admin/api_insert_sales.php"; $data = [ 'site_url' => 'https://'.strtolower($crm_website), 'form_name' => $form_name, 'business_area' => 'FSSAI', 'cus_full_name' => $applicant_name, 'cus_mobile' => $mobile_number, 'cus_email' => $email_id, 'state' => $_POST["office_state"], 'order_id' => $orderId, 'payment_amount' => $product_price ]; $ch = curl_init($api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); $response = curl_exec($ch); if (curl_errno($ch)) { throw new Exception('cURL Error: ' . curl_error($ch)); } curl_close($ch); $ch = curl_init('https://msmebiz.shop/api/registration-form-submission.php?formId='.$_SESSION["form_id"].'&vendor=TTG&business=FSSAI&website=FOODLICENCEPORTAL.NET&amount='.$product_price.'&status=Unpaid&name='.$applicant_name.'&mobile='.$mobile_number.'&email='.$email_id.'&formName='.$form_name.'&state='.$state.''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $_SESSION["panel_form_id_2"] = $response; // Payment Gateway Redirection include_once('client-email.php'); #include_once("./editable/submit-form.php"); if($currentPaymentGateway =='CASHFREE'){ include_once('cashfree/submit.php'); }else{ include_once('./payu/payu-submit.php'); } die(); } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка