/
home
/
desid573
/
public_html
/
app
/
/home/desid573/public_html/app
mkdir
upload
Name
Size
Mode
Actions
braintree/
-
0755
rm
lib/
-
0755
rm
twilio-php-master/
-
0755
rm
vendor/
-
0755
rm
after_booking_page.php
2595
0644
edit
dl
rm
appoff.php
4782
0644
edit
dl
rm
booking.php
9655
0644
edit
dl
rm
cancel_booking.php
4925
0644
edit
dl
rm
composer.json
65
0644
edit
dl
rm
composer.lock
2355
0644
edit
dl
rm
confirmsend.php
2983
0644
edit
dl
rm
contact_us_mail.php
890
0644
edit
dl
rm
copy_account_to_homekey.php
4334
0644
edit
dl
rm
dispatch.php
877
0644
edit
dl
rm
emailConfirmReset.php
401
0644
edit
dl
rm
error_log
586874
0644
edit
dl
rm
family-cab_small.jpg
98853
0644
edit
dl
rm
generate_credit.php
3098
0644
edit
dl
rm
generate_referall.php
2779
0644
edit
dl
rm
getuser_byid.php
2341
0644
edit
dl
rm
getuser_bymail.php
2183
0644
edit
dl
rm
get_all_booking.php
779
0644
edit
dl
rm
get_booking_bybooking_id.php
813
0644
edit
dl
rm
get_booking_byuser.php
1057
0644
edit
dl
rm
get_booking_status.php
2170
0644
edit
dl
rm
get_completed_bookings.php
710
0644
edit
dl
rm
get_ETA.php
6332
0644
edit
dl
rm
get_lead_message.php
673
0644
edit
dl
rm
get_open_bookings.php
1399
0644
edit
dl
rm
get_payment_byuser.php
1064
0644
edit
dl
rm
get_price.php
760
0644
edit
dl
rm
get_recipes.php
6361
0644
edit
dl
rm
get_TE.php
1217
0644
edit
dl
rm
index.php
10411
0644
edit
dl
rm
index_backup.php
4791
0644
edit
dl
rm
lib_tr.zip
105047
0644
edit
dl
rm
login_api.php
5789
0644
edit
dl
rm
noteconfirm.php
8208
0644
edit
dl
rm
off.php
2854
0644
edit
dl
rm
passwordResetLink.php
5190
0644
edit
dl
rm
pay_file.php
7302
0644
edit
dl
rm
pay_file_back.php
5326
0644
edit
dl
rm
placehold.html
2141
0644
edit
dl
rm
post.php
2535
0644
edit
dl
rm
reset_email.php
1775
0644
edit
dl
rm
reset_phone.php
5717
0644
edit
dl
rm
test_222.php
845
0644
edit
dl
rm
update_api.php
5910
0644
edit
dl
rm
update_api_on_mail.php
4723
0644
edit
dl
rm
validatecode.php
1094
0644
edit
dl
rm
validatephone.php
1055
0644
edit
dl
rm
Edit:
/home/desid573/public_html/app/update_api_on_mail.php
(4723B)
<?php require("lib/config.php"); require_once 'vendor/eway/eway-rapid-php/include_eway.php'; // =============== New customer user api =================================== $data = $_REQUEST; //$fullname = $_REQUEST["fname"]." ".$_REQUEST["lname"]; //$fullname = $_REQUEST["name"]; //$name_split = explode(" ", $fullname); //$fname = $name_split[0]; //$lname = $name_split[1]; $fname = $_REQUEST["fname"]; $lname = $_REQUEST["lname"]; $fullname = $fname." ".$lname; $exp = $_REQUEST["exp"]; $exp_split = explode("/" ,$exp); $expmonth = $exp_split[0]; $expyear = $exp_split[1]; if(isset($_REQUEST["pass"])) { $password = MD5($_REQUEST["pass"]); } $sql = "SELECT id FROM customers where email = '".$_REQUEST['email']."'"; $result = $conn->query($sql); while($row_details = $result->fetch_assoc()) { $cid = $row_details["id"] ; } $cid; if ($result->num_rows > 0) { $sql= "UPDATE `perthdes_new_pro_api`.`customers` SET"; if(isset($_REQUEST["fname"]) && isset($_REQUEST["lname"])) { $sql.= " `name` = '".$fullname."',"; } if(isset($_REQUEST["phone"])) { $sql.= "`mobile` = '".$_REQUEST["phone"]."',"; } if(isset($_REQUEST["pass"])) { $sql.= "`password` = '".$password."' ,"; } $sql.= "`modified` = NOW() WHERE `customers`.`email` ='".$_REQUEST["email"]."'"; //$sql; if($conn->query($sql)) { $cust["status"][] = "ok"; $sql_detail="UPDATE `perthdes_new_pro_api`.`customer_details` SET "; if(isset($_REQUEST["address"])) { $sql_detail.= "`address` = '".$_REQUEST["address"]."', "; } if(isset($_REQUEST["addr_la"])) { $sql_detail.="`addr_lat` = '".$_REQUEST["addr_la"]."', "; } if(isset($_REQUEST["addr_long"])) { $sql_detail.="`addr_long` = '".$_REQUEST["addr_long"]."' "; } $sql_detail.="WHERE `customer_details`.`cid` =".$cid; //echo $sql_detail; if($conn->query($sql_detail)) { $cust["status"][] = "ok"; //========================token Id =================================== $client_key = '4T7y1vuKPkdhRYUQdH6msueW9hqV2wpcwnSk0Qwxkvwf7TjQn40qymPW7IJb66gUC1w1505cDMkj9IR82juQEnIp4/8nd0nDhwYDSDoqROtNBWmkqtqYmF6F4qVGMUq3HpJrY3y2kdSljCFfWzWc7LIEn4G5XY2IZAPgAO5+mhwvYrricmqwLhqzV4FBUII5AwTvJZl4awrdul4vLWkS73vJuW/XrXHseGK/nqB3oSRluZ1jKp2qDgVTwrXYEbx4rwwS42X2w0C9tLKywxf27WD2CCK8ftSeQBimVqFI0r6VuRXFVaOn6SQTOD9V/TsCfPk5Zh6/PWcfapyVKS+l1w=='; $apiKey = '44DD7APNUxR8/4sDLhEVT11OS00fmBo4Haxj4ZGJGHvtLBP0rC/ayqNhbVu9tEJrjlJPJm'; $apiPassword = 'y2b7QMpd'; //$apiKey = '60CF3Ce97nRS1Z1Wp5m9kMmzHHEh8Rkuj31QCtVxjPWGYA9FymyqsK0Enm1P6mHJf0THbR'; //$apiPassword = 'API-P4ss'; //$apiEndpoint = \Eway\Rapid\Client::MODE_SANDBOX; // Use \Eway\Rapid\Client::MODE_PRODUCTION when you go live $apiEndpoint = \Eway\Rapid\Client::MODE_PRODUCTION; // Use \Eway\Rapid\Client::MODE_PRODUCTION when you go live $client = \Eway\Rapid::createClient($apiKey, $apiPassword, $apiEndpoint); $customer = [ 'Title' => 'Mr.', 'FirstName' => $fname, 'LastName' => $lname, 'Country' => 'au', 'CardDetails' => [ 'Name' => $fullname, 'Number' => $_REQUEST["credit_card"], 'ExpiryMonth' => $expmonth , 'ExpiryYear' => $expyear, 'CVN' => $_REQUEST["CVV"], ] ]; $response = $client->createCustomer(\Eway\Rapid\Enum\ApiMethod::DIRECT, $customer); $tokencustomerid = $response->Customer->TokenCustomerID; //===========================token id end here ======================== $sql_card_token = "UPDATE `perthdes_new_pro_api`.`customer_tokens` SET `access_token_value` = '".$tokencustomerid."' , `status` = '".$_REQUEST["user_agree"]."' ,`modified` = NOW() WHERE `customer_tokens`.`cid` ='".$cid."'"; if($conn->query($sql_card_token)) { $cust["status"][] = "ok"; } else { $cust["error"][] = "error"; } } else { $cust["error"][] = "error"; } } else { $cust["error"][] = "error"; } //echo "<pre>"; // print_r($cust); //echo "</pre>"; $count = sizeof($cust["status"]); $count_error = sizeof($cust["error"]); if($count==3) { $Res["massege"] = "customer data is updated"; $Res["status"] = "ok"; } if($count_error >0) { $Res["massege"] = "customer data has some issue"; $Res["status"] = "error"; } } else { $Res["massege"] = "No such Id present in database"; $Res["status"] = "error"; } echo json_encode(new ArrayObject($Res)); //echo "<pre>"; //print_r($data); //print_r($customer); //print_r($Res); //echo "</pre>"; $conn->close(); // =============== New customer user api End Here ========================== ?>
Save
cmd:
run