3456, 'amount' => $price * 100, 'currency' => 'INR', 'payment_capture' => 1, ]; $razorpayOrder = $api->order->create($orderData); $razorpayOrderId = $razorpayOrder['id']; $_SESSION['razorpay_order_id'] = $razorpayOrderId; $browsessionid=session_id(); $Updatecart = mysql_query("UPDATE tbl_appointment SET `razid`='$razorpayOrderId' WHERE `session_id`='$browsessionid' and status='0'"); $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; } $data = [ "key" => $keyId, "amount" => $amount, "name" => "ENERGY FOODS", "description" => "Dr. G.ANBUGANAPATHI", "image" => "http://drganbuganapathi.com/default/img/anbuganapathi.jpg", "prefill" => [ "name" => $customer, "email" => $email, "contact" => $contact, ], "notes" => [ "address" => "Hello World", "merchant_order_id" => "12312321", ], "theme" => [ "color" => "#F37254", ], "order_id" => $razorpayOrderId, ]; if ($displayCurrency !== 'INR') { $data['display_currency'] = $displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); $login = "SELECT * from tbl_appointment WHERE razid= '$razorpayOrderId' "; $resqry = mysqli_query($conn, $login); $Fetcorderid = mysqli_fetch_assoc($resqry); $get_con = mysqli_query($conn, "select tm.name, ta.mem_id, ta.consulting_for, tm.phone, tm.dob, tm.location_city, ta.appointment_date, ta.amount, ta.vehicle, ta.hour_date, ta.min_date, ta.am_date from tbl_appointment ta inner join tbl_member tm on ta.mem_id = tm.id where tm.id = '".$Fetcorderid['mem_id']."'"); $get_consult = mysqli_fetch_array($get_con, MYSQLI_ASSOC); $hour_date = $get_consult['hour_date']; if($get_consult['min_date'] == 0){ $min_date = '00 '.$get_consult['am_date']; }else{ $min_date = $get_consult['min_date'].' '.$get_consult['am_date']; } $insert = "INSERT INTO tbl_missed_dealer_oc_log (cust_name, mem_id, amount, app_date, hour_date, min_date, am_date, dob, phone, location_city, consulting_for, reference, email, country, razid, session_id, pay_status, created_at) VALUES('".$get_consult['name']."', '".$Fetcorderid['mem_id']."', '$price', '".$get_consult['appointment_date']."', '$hour_date', '".$get_consult['min_date']."', '".$get_consult['am_date']."', '".$get_consult['dob']."', '".$get_consult['phone']."', '".$get_consult['location_city']."', '".$get_consult['consulting_for']."', '".$get_consult['vehicle']."', '$email', '$mycountry', '$razorpayOrderId', '$browsessionid','pre-order', CURRENT_TIMESTAMP);"; mysqli_query($conn, $insert); ?>
Loading...
Please wait while we process your payment...
Your payment is being submitted. Please do not close this window or click the Back button on your browser.