/home/desid573/public_html/angel
NameSizeModeActions
assets/-0755rm
drivers/-0755rm
font/-0755rm
lib/-0755rm
payment/-0755rm
stripe/-0755rm
twilio-php-master/-0755rm
vendor/-0755rm
after_booking_page.php25950644editdlrm
angeldrivers.png1320950644editdlrm
a_name_address.php12890644editdlrm
booking.php96210644editdlrm
booking_28-04-2017.php9470644editdlrm
booking_29-04-2017.php37170644editdlrm
cancel.php24300644editdlrm
cancel_booking.php53670644editdlrm
composer.json650644editdlrm
composer.lock23550644editdlrm
confirmsend.php25820644editdlrm
contact_us_mail.php9030644editdlrm
dispatch.php8640644editdlrm
error_log4362574560644editdlrm
generate_credit.php31870644editdlrm
generate_referall.php27790644editdlrm
getPrice.php7380644editdlrm
getuser_byid.php23410644editdlrm
getuser_bymail.php19680644editdlrm
get_all_booking.php7790644editdlrm
get_booking_bybooking_id.php8130644editdlrm
get_booking_byuser.php10570644editdlrm
get_booking_status.php22190644editdlrm
get_completed_bookings.php7270644editdlrm
get_directions.php8130644editdlrm
get_lead_message.php6730644editdlrm
get_open_bookings.php14650644editdlrm
get_payment_byuser.php10640644editdlrm
home.php16600644editdlrm
homekey_img.png140370644editdlrm
hook.php212670644editdlrm
hook_set_up.php6540644editdlrm
index.php120070644editdlrm
index_backup.php47910644editdlrm
jobdetails.php121970644editdlrm
lib_tr.zip1050470644editdlrm
login_api.php77980644editdlrm
login_api_old.php56530644editdlrm
noteconfirm.php92590644editdlrm
online_booking.php282830644editdlrm
passwordResetLink.php51950644editdlrm
pay_file.php73020644editdlrm
pay_file_back.php53260644editdlrm
placehold.html21840644editdlrm
priceCheck.php00644editdlrm
reset_email.php17550644editdlrm
search.php8300644editdlrm
send_bulk_notif.php16920644editdlrm
setprice.php44290644editdlrm
setprice_database.php5850644editdlrm
smsconfirm.php98300644editdlrm
smssend.php23540644editdlrm
stripe-php-master.zip2543660644editdlrm
test1.php1590644editdlrm
test_222.php8450644editdlrm
thankyou.php174700644editdlrm
update_api.php62900644editdlrm
update_api_on_mail.php46770644editdlrm
validatecode.php10940644editdlrm
validatephone.php10340644editdlrm
Edit: /home/desid573/public_html/angel/thankyou.php (17470B)
Angel Drivers Payment Processed
num_rows > 0) { $row = mysqli_fetch_assoc($result); $cid = $row['id']; if($cid != "") { $query = "SELECT * FROM customer_tokens WHERE cid = ".$cid; $result = mysqli_query($conn, $query); if($result->num_rows > 0) { $row = mysqli_fetch_assoc($result); $tokenID = $row['access_token_value']; } } } //create customer if($tokenID == "") { // Set values in your customer object. $result = \Stripe\Customer::create([ 'source' => $_POST['stripeToken'], 'email' => $email, 'name' => $nameq, 'phone' => $phone ]); $cust_id = $result["id"]; // Create a Customers API client error_log($result); $sql = "INSERT INTO `customers`(`id`, `name`, `mobile`, `email`, `password`, `firebase_token`, `promo_code`, `promo_used`, `is_delete`, `created`, `modified`) VALUES (NULL,'".$nameq."','".$phone."','".$email."','','','','','',NOW(),NOW())"; $result = mysqli_query($conn, $sql); if(!$result) { error_log("customer add error: ".$conn->error); } $cid = $conn->insert_id; $sql = "INSERT INTO `customer_tokens`(`id`, `cid`, `access_token_value`, `status`, `created`, `modified`) VALUES (NULL,".$cid.",'".$cust_id."','',NOW(),NOW()) ON DUPLICATE KEY UPDATE `access_token_value` = '".$cust_id."'"; $result = mysqli_query($conn, $sql); if(!$result) { error_log("customer token add error: ".$conn->error); } $tokenID = $cust_id; } else { //update customer $result = \Stripe\Customer::update($tokenID, [ 'source' => $_POST["stripeToken"], ]); error_log($result); } } $pickup= $_POST['pickup']; $dropoff= $_POST['dropoff']; $date = $_POST['date']; $d = date_create_from_format("jS M, Y", $date); $date24 = date_format($d, "Y-m-d"); error_log($date24); $time= $_POST['time']; $time24 = date("H:i:s", strtotime($time)); $timeUTC = date("c", strtotime("$date24 $time24")); $timestamp = strtotime("$date24 $time24") * 1000; $type = $_POST["type"]; $lat1= $_POST['lat1_value']; $lng1= $_POST['lng1_value']; $lat2= $_POST['lat2_value']; $lng2= $_POST['lng2_value']; $onewayprice= $_POST['onewayPrice']; if(!$error) { $paymentlink = shortenLink($reference, $type, "angelPAY"); $km_est = $_POST['km_est']; $time_est = $_POST['time_est']; $detailsq = mysqli_real_escape_string($conn, $_POST["information"]); $promo_code = mysqli_real_escape_string($conn, $_POST["promo_code"]); $pickupq = mysqli_real_escape_string($conn, $pickup); $dropoffq = mysqli_real_escape_string($conn, $dropoff); if($_POST['account']==1) { $tokenID = $_POST['token']; $cid = $_POST["cid"]; $fullname = $_POST['name']; } $curlObj = curl_init(); curl_setopt($curlObj, CURLOPT_URL, 'https://api.fleeteng.com.au/v2/graph/role/jobs?access_token='.$vromo); curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curlObj, CURLOPT_HEADER, 0); curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json')); curl_setopt($curlObj, CURLOPT_POST, 1); curl_setopt($curlObj, CURLOPT_POSTFIELDS, '[{"name": "AD ' . $fullname . '", "campaign": {"id": 208285240573953}, "contact": {"name": "' . $fullname . '","phone": "' . $phone . '","email": "' . $email . '"},"tasks": [{"timeframe":{"by": '.$timestamp.'}, "zone": {"name": "' . $pickup . '","address": "' . $pickup . '","coords": {"lat": ' . $lat1 . ',"lon": ' . $lng1 . '},"radius": 100}},{"zone": {"name": "' . $dropoff . '","address": "' . $dropoff . '","coords": {"lat": ' . $lat2 . ',"lon": ' . $lng2 . '},"radius": 100}}],"attr": [{ "key": "Payment Link", "value": "' . $paymentlink . '" }]}]'); // , $response = curl_exec($curlObj); error_log($response); $json = json_decode($response, true); curl_close($curlObj); $spatulalink = $json['items'][0]['tracking']; $spatulaid = $json['items'][0]['id']; $query = "INSERT INTO `booking`(`id`, `cid`, `email`, `booking_date`, `booking_time`, `pickup_addr`, `pickup_lat`, `pickup_long`, `pickoff_addr`, `pickoff_lat`, `pickoff_long`, `instructions`, `promo_code`, `spatula_id`, `spatula_link`, `reference`, `type`, `quote`, `quote_km`, `quote_time`, `token`, `xero_inv`, `payment_stripe`, `status`, `driver`) VALUES (NULL,".$cid.",'".$email."','".$date24."','".$time24."','".$pickupq."','".$lat1."','".$lng1."','".$dropoffq."','".$lat2."','".$lng2."', '".$detailsq."', '".$promo_code."','".$spatulaid."','".$spatulalink."','".$reference."','".$type."','".$onewayprice."','".$km_est."','".$time_est."', '".$tokenID."','','','','')"; error_log($query); $success = $conn->query($query); if (!$success) { error_log("Could not enter booking data: ".$conn->error); } else { $sql = "INSERT INTO `customer_details`(`id`, `cid`, `address`, `addr_lat`, `addr_long`) VALUES (null,".$cid.",'".$dropoffq."','".$lat2."','".$lng2."') ON DUPLICATE KEY UPDATE `address` = '".$dropoffq."', `addr_lat` = '".$lat2."', `addr_long` = '".$lng2."'"; $success = $conn->query($sql); if(!$success) { error_log("Could not customer address data: ".$conn->error); } } $slackLink = shortenLink($reference, "AD", "angelSMS"); $slackmessage = "<$slackLink | Confirm Booking> for $fullname \n$date $time\n$pickup\n$dropoff"; $url = "https://hooks.slack.com/services/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"; $curlObj = curl_init(); curl_setopt($curlObj, CURLOPT_URL, $url); curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curlObj, CURLOPT_HEADER, 0); curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json')); curl_setopt($curlObj, CURLOPT_POST, 1); curl_setopt($curlObj, CURLOPT_POSTFIELDS, '{"text": "'.$slackmessage.'"}'); $response = curl_exec($curlObj); curl_close($curlObj); if($response == "ok") { error_log("Slack Sent"); } else { error_log("Slack not sent"); } require("../google/google-api-php-client-2.2.1/angelAdd.php"); $link = shortenLink($reference, "AD", "angelOPT"); addToCalendar("AD", $reference, $link); echo "

Your booking has been successfully processed

"; echo "

You will receive an SMS confirmation from the dispatch team within 30 mins (unless you have submitted after hours)

"; $message= "Type GC
Date $date $time24
Square Customer ID $custID
Card ID $cardID
Name $fullname
Phone $phone
Pick Up $pickup
Flight Number $fnum1
Mins post flight $ptime1
TO
Drop Off $dropoff
Quoted $onewayprice
Credit Card Authorised
Number of Passengers $passNum
Number of RF Seats $rfNum
Number of FF Seats $ffNum
Number of Boosters $boostNum
Luggage $luggage
Lat1 $lat1
Long1 $lng1
Lat2 $lat2
Long2 $lng2
Reference $reference
Email $email
"; send_mail('lwscann@gmail.com','booking@angeldrivers.com.au','New Order From'.$email ,$message); echo "

When your driver is en route you will receive an SMS with a tracking link and driver contact details. If you do not receive this SMS atleast 10 mins before your booking time please contact us on 0411301301

"; echo "

Trip Details

"; echo "
Name $fullname
Phone $phone
Email $email
Pick Up $pickup
Drop Off $dropoff
Date/Time $date $time
Quoted $onewayprice
"; $body = "
Hi ".$name.", Thank you for submitting your booking request. Your submitted details are below. You will receive an SMS Notification when your booking is confirmed.
Name ".$fullname."
Phone ".$phone."
Email ".$email."
Pick Up ".$pickup."
Drop Off ".$dropoff."
Date/Time ".$date." ".$time."
Quoted $".$onewayprice."
When your driver is en route you will receive an SMS with a tracking link and driver contact details. If you do not receive this SMS atleast 10 mins before your booking time please contact us on 0411301301
"; send_mail($email,'booking@angeldrivers.com.au', 'Your Booking Submission to Angel Drivers for '.$date.' '.$time,$body); ?>
Your card has been declined
\n"; echo $errormessage."
\n"; echo "

Refresh

"; } ?>