/
home
/
desid573
/
public_html
/
fc_api
/
/home/desid573/public_html/fc_api
mkdir
upload
Name
Size
Mode
Actions
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
17680
0644
edit
dl
rm
booking_edit_request.php
10196
0644
edit
dl
rm
cancel_booking.php
6064
0644
edit
dl
rm
check_open.php
0
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
confirm_booking_change.php
6305
0644
edit
dl
rm
confirm_booking_change_ajax.php
6696
0644
edit
dl
rm
contact_us_mail.php
890
0644
edit
dl
rm
copy_account_to_homekey.php
4338
0644
edit
dl
rm
dispatch.php
877
0644
edit
dl
rm
emailConfirmReset.php
486
0644
edit
dl
rm
error_log
30761021
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
3419
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
3246
0644
edit
dl
rm
get_completed_bookings.php
710
0644
edit
dl
rm
get_ETA.php
5013
0644
edit
dl
rm
get_lead_message.php
673
0644
edit
dl
rm
get_open_bookings.php
1537
0644
edit
dl
rm
get_payment_byuser.php
1064
0644
edit
dl
rm
get_price.php
41
0644
edit
dl
rm
get_recipes.php
6361
0644
edit
dl
rm
get_request_details.php
976
0644
edit
dl
rm
get_TE.php
1217
0644
edit
dl
rm
index.php
13722
0644
edit
dl
rm
index_backup.php
4791
0644
edit
dl
rm
lib_tr.zip
105047
0644
edit
dl
rm
login_api.php
8679
0644
edit
dl
rm
noteconfirm.php
9228
0644
edit
dl
rm
off.php
2854
0644
edit
dl
rm
passwordResetLink.php
5170
0644
edit
dl
rm
pay_file.php
7302
0644
edit
dl
rm
pay_file_back.php
5326
0644
edit
dl
rm
placehold.html
2147
0644
edit
dl
rm
reset_email.php
1755
0644
edit
dl
rm
reset_phone.php
5717
0644
edit
dl
rm
test2.php
0
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
1034
0644
edit
dl
rm
Edit:
/home/desid573/public_html/fc_api/index_backup.php
(4791B)
<?php require("lib/config.php"); require_once 'vendor/eway/eway-rapid-php/include_eway.php'; // =============== New customer user api =================================== $data = $_REQUEST; $sql = "SELECT id FROM customers where email = '".$_REQUEST['email']."'"; $result = $conn->query($sql); if ($result->num_rows > 0) { $Res["mail"] = $_REQUEST["email"]; $Res["message"] = "User already exist with this mail id"; $Res["customer_status"] = "already exist"; } else { if($_REQUEST['user_agree']=="1") { $pass = MD5($_REQUEST["pass"]); //$fullname = $_REQUEST["fname"]." ".$_REQUEST["lname"]; $fullname = $_REQUEST["name"]; $name_s = explode(" ",$fullname); $fname = $name_s[0] ; $lname = $name_s[1] ; $sql = "INSERT INTO `customers` (`id`, `name`, `mobile`, `email`,`password`,`is_delete`, `created`, `modified`) VALUES (NULL, '".$fullname."', '".$_REQUEST["phone"]."', '".$_REQUEST["email"]."', '".$pass."', '0',NOW() ,NOW() )"; if ($conn->query($sql) === TRUE) { //$Res["customer_id"] = $conn->insert_id; if($conn->insert_id) { $exp = $_REQUEST["exp"]; $exp_s = explode("/",$exp); $expmonth = $exp_s[0]; $expyear = $exp_s[1]; $cid = $conn->insert_id; $cvv = $_REQUEST["CVV"]; $card_zipcode = $_REQUEST["card_zipcode"]; $addr_lat = $_REQUEST["addr_la"]; $addr_long = $_REQUEST["addr_long"]; $sql_detail = "INSERT INTO `perthdes_new_pro_api`.`customer_details` (`id`, `cid`, `address`, `addr_lat`, `addr_long`, `card_number`, `cvv`, `card_holder_name`, `card_zipcode`, `ExpiryMonth`, `Expiryyear`) VALUES (NULL, '".$cid."', '".$_REQUEST['address']."', '".$addr_lat."','".$_REQUEST['addr_long']."', '".$_REQUEST['credit_card']."', '".$_REQUEST['CVV']."', '".$_REQUEST['card_holder']."', '".$_REQUEST['card_zipcode']."', '".$expmonth."', '".$expyear."')"; if ($conn->query($sql_detail) === TRUE) { //$Res["customer_detail_id"] = $conn->insert_id; //$Res["customer_detail_status"] = "OK"; $success[] = "Ok" ; } else { //$Res["customer_detail_status"] = "Error"; $error[] = "Error"; } //========================token Id =================================== $apiKey = '60CF3Ce97nRS1Z1Wp5m9kMmzHHEh8Rkuj31QCtVxjPWGYA9FymyqsK0Enm1P6mHJf0THbR'; $apiPassword = 'API-P4ss'; $apiEndpoint = \Eway\Rapid\Client::MODE_SANDBOX; // Use \Eway\Rapid\Client::MODE_PRODUCTION when you go live $client = \Eway\Rapid::createClient($apiKey, $apiPassword, $apiEndpoint); /*$customer = [ 'Title' => 'Mr.', 'FirstName' => 'coder', 'LastName' => 'test', 'Country' => 'au', 'CardDetails' => [ 'Name' => 'coder test', 'Number' => '4444333322221111', 'ExpiryMonth' => '12', 'ExpiryYear' => '25', 'CVN' => '123', ] ];*/ $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 ======================== if($tokencustomerid) { $sql_token = "INSERT INTO `perthdes_new_pro_api`.`customer_tokens` (`id`, `cid`, `access_token_value`, `status`, `created`, `modified`) VALUES (NULL, '".$cid."', '".$tokencustomerid ."', '".$_REQUEST['user_agree']."', NOW(), NOW())"; if ($conn->query($sql_token) === TRUE) { //$Res["customer_token_id"] = $conn->insert_id; //$Res["customer_token_status"] = "OK"; $success[] = "Ok" ; } else { //$Res["customer_token_status"] = "Error"; $error[] = "Error"; } } } //$Res["data"] = $data; //$Res["token"] = $tokencustomerid; //$success[] = "Ok" ; $success = sizeof($success); $error = sizeof($error); if($success==2) { $Res["message"] = "New Customer is created successfully"; $Res["customer_status"] = "ok"; } if($error>0) { $Res["message"] = "User data not accurate"; $Res["customer_status"] = "error"; } } else { $Res["message"] = "Error: " . $sql . "<br>" . $conn->error; $Res["customer_status"] = "error"; //$error[] = "Error"; } } else { $Res["message"] = "user not accepted the user agreement! "; $Res["customer_status"] = "agreement error"; } } echo json_encode(new ArrayObject($Res)); //echo "<pre>"; //print_r($Res); //print_r($response); //echo "</pre>"; $conn->close(); // =============== New customer user api End Here ========================== ?>
Save
cmd:
run