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(); } } ?>