$_SESSION['razorpay_order_id'], 'razorpay_payment_id' => $_POST['razorpay_payment_id'], 'razorpay_signature' => $_POST['razorpay_signature'], ); $api->utility->verifyPaymentSignature($attributes); } catch (SignatureVerificationError $e) { $success = false; $error = 'Razorpay Error : ' . $e->getMessage(); } } if ($success === true) { $razorpay_order_id = $_SESSION['razorpay_order_id']; $razorpay_payment_id = $_POST['razorpay_payment_id']; $email = $_SESSION['email']; $price = $_SESSION['price']; date_default_timezone_set('Asia/Kolkata'); $datemal = date_default_timezone_set('Asia/Kolkata'); $dt2=date('Y-m-d H:i:s'); $login_12 = "SELECT * from tbl_appointment WHERE order_id!= '' "; $resqry_12 = mysql_query($login_12) or die("ERROR:".mysql_error()); $numrows_12 = mysql_num_rows($resqry_12); // $tot_order_id=($numrows_12+1); $tot_order_id=generate($conn); $login = "SELECT * from tbl_appointment WHERE razid= '$razorpay_order_id' "; $resqry = mysql_query($login) or die("ERROR:".mysql_error()); $numrows = mysql_num_rows($resqry); $Fetcorderid = mysql_fetch_array($resqry); $mailcopy=$Fetcorderid ['email_id']; /* $date=$rowsss['date'];*/ $me_id=$Fetcorderid['mem_id']; $order_id=$Fetcorderid['id']; $ap_date= $Fetcorderid['appointment_date']; $consulting_for= $Fetcorderid['consulting_for']; $ap_hour= sprintf("%02d",$Fetcorderid['hour_date']); $ap_min= sprintf("%02d",$Fetcorderid['min_date']); $ap_sec= $Fetcorderid['am_date']; $amount= $Fetcorderid['amount']; $Query = "SELECT * from `tbl_member` where id='$me_id' "; $name = mysql_query($Query) or die("ERROR:".mysql_error()); $no=mysql_num_rows($name); $row = mysql_fetch_array($name); $firstname= $row['name']; $country= $row['country']; $mobss= $row['phone']; $language= $row['language']; $age= $row['dob']; $skypeid=$row['skypeid']; /*sprintf("%02d", $to_hour); */ $new_email=$row['email']; $Query_user = "SELECT * from `shop_user` where email='$new_email' "; $name_user = mysql_query($Query_user) or die("ERROR:".mysql_error()); $no_user=mysql_num_rows($name_user); $row_user = mysql_fetch_array($name_user); $user_address =$row_user['address']; $user_city=$row_user['city']; $user_state=$row_user['state']; $user_postcode=$row_user['postcode']; $user_country= $row_user['country']; //$Updatecart = mysql_query("UPDATE tbl_appointment SET `status`='1' WHERE `session_id`='$browsessionid' and status='0' "); $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 = '$me_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']; } $msg_to_verify = '
Name '.$get_consult['name'].'
Age '.$get_consult['dob'].'
Phone '.$get_consult['phone'].'
Location '.$get_consult['location_city'].'
Consulting For '.$get_consult['consulting_for'].'
How do you know Doctor '.$get_consult['vehicle'].'
Appointment Date & Time '.date('d-m-Y', strtotime($get_consult['appointment_date'])).' '.$hour_date.' '.$min_date.'
Booked Date & Time '.date('d-m-Y H:i:s').'
Amount '.$price.'
Razorpay Order Id '.$razorpay_order_id.'
Razorpay Payment Id '.$razorpay_payment_id.'
Session ID '.$browsessionid.'
'; $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']."', '$me_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', '$razorpay_order_id', '$browsessionid','post-order', CURRENT_TIMESTAMP);"; mysqli_query($conn, $insert); $subject_to_verify = 'Online Consultation Form Submitted by Dealer for '.$get_consult['name'].' / '.$get_consult['phone'].' / '.$razorpay_order_id; $_SESSION['msg_to_verify'] = $msg_to_verify; $_SESSION['subject_to_verify'] = $subject_to_verify; send_mail($subject_to_verify, $msg_to_verify); if($numrows>0) { $Updatecart = mysql_query("UPDATE tbl_appointment SET `status`='1',`payment_type`='Razorpay',`session_id`='',`added_date`='$dt2',`order_id`='$tot_order_id' WHERE `razid`='$razorpay_order_id'"); /* -----------------------------------*/ $user = "A5aa862a129267ac55838c7f2e5869d7f"; //your username $password = "conform123"; //your password $senderid="DRANBU"; //Your senderid $messagetype="N"; //Type Of Your Message $url="http://hpsms.dial4sms.com/api/web2sms.php?"; //$message = "Hi ".$firstname." your appointment with Dr. G.ANBUGANAPATHI on ".$ap_date." ".$ap_hour.":".$ap_min.":".$ap_sec." is booked"; //enter Your Message $msg1dddd.="$ap_date"; $msg1dddd.=" $ap_hour"; /*echo $nnnnnnnnnn. ="$ap_date"; echo $nnnnnnnnnn. =" $ap_hour"; exit();*/ $message = "Hi ".$firstname." your appointment with Dr. G.ANBUGANAPATHI on ".$msg1dddd.":".$ap_min.":".$ap_sec." is booked. DRANBU"; //enter Your Message $message = urlencode($message); curl_setopt_array($curl, array( CURLOPT_URL => 'http://sms.dial4sms.com/api/v2/SendSMS?SenderId=DRANBU&Message='.$message.'&MobileNumbers='.$mobss.'&ApiKey=eYfIWFmiAMhbL6JDTfOb3kzGzQr+eimy6prshuD8qLo=&ClientId=b45d4e3d-cb26-4856-8cbf-93a02a7b9eeb', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', )); $response = curl_exec($curl); curl_close($curl); //$mobilenumbers1='$res_owner_mobile'; $Msg5 = '

Dr. G.ANBUGANAPATHI
 
Appointment Details
Hi '.$firstname.' your appointment with Dr. G.ANBUGANAPATHI on '.$ap_date.' '.$ap_hour.':'.$ap_min.':'.$ap_sec.'(Indian Standard Time) is booked
Compulsory contact the clinic 89390 55088 between(8.30 a.m to 8.30 p.m.) and confirm it.

* If the patient is not attending the call or if the mobile is switched off means payment will not be refunded.
Patient can be able to cancel their appointment before 24 hours and 100% consultation fees will be refunded.


Click the button below to view your Consultation Receipt
Copyright © 2020 - drganbuganapathi.com, All Rights Reserved.
'; $msg1_mal='
Online Consultation Details
ENERGY Foods
#11,2nd Street, Radha Nagar Extn.
Velachery,Chennai 600 042.
State :Tamilnadu  Code:33
Phone:044-2253 1316
Email : drganbuganapathi@gmail.com
Website : www.drganbuganapathi.com
GSTIN:33ACMPA1286A2Z7
PAN:ACMPA1286A
Receipt No : OC-'.$tot_order_id.'
Payment Mode-Payumoney
Name:'.$firstname.' Phone:'.$mobss.' Age:'.$age.' Date:'.$ap_date.'
Consulting For:'.$consulting_for.' Country:'.$country.' Speak:'.$language.' Time:'.$ap_hour.':'.$ap_min.''.$ap_sec.'
Address:
'.$user_address.'
'.$user_city.'
'.$user_state.'-'.$user_postcode.'.'.$user_country.'
Fees:'.$amount.'
'; $job_name14357="Appointment Confirmation in Dr. G.ANBUGANAPATHI"; $Subjectnew123 = "$job_name14357-$order_id"; $Subject1="Appointment Confirmation in Dr. G.ANBUGANAPATHI"; //echo $mailformat; //$mailheaders = "Content-type: text/html; charset=iso-8859-1\r\n"; //$useremail_kan="drganbuganapathi@gmail.com"; $useremail="drganbuganapathi@gmail.com"; $headers1 = "From: dranbuganapathi.com\r\n"."Content-Type: text/html; charset=iso-8859-1\r\n"; $msg1_mal; @mail($useremail,$Subjectnew123,$Msg5,$headers1); @mail($mailcopy,$Subject1,$Msg5,$headers1); //@mail($useremail,$Subjectnew123,$msg1_mal,$headers1); //@mail($mailcopy,$Subjectnew123,$msg1_mal,$headers1); } $html = "

Your payment was successful

Payment ID: {$_POST['razorpay_payment_id']}

"; } else { $html = "

Your payment failed

{$error}

"; } echo $html; if ($success === true) { ?> Merchant Check Out Page

Please do not refresh this page...