File: /storage/v4513/ivenusin/public_html/wp-content/themes/ivenus/ajax/_ivenus-cashify-exchange.php
<?php
function cashify_exchange_function()
{
$res = array();
$res["status"] = 0;
$res["msg"] = 'in call';
global $wpdb;
$table = $wpdb->prefix.'ivenus_cashify';
$data = array('user_id' => $_POST['user_id'], 'pid' => $_POST['pid'], 'pn' => $_POST['pn'], 'amount' => $_POST['amount'], 'ref_code' => $_POST['uid'], 'service_id' => null, 'r_id' => null, 'service_status' => 0, 'date_created' => current_time('mysql'), 'last_modified' => current_time('mysql'));
$res["status"] = $wpdb->insert($table,$data);
header( "Content-Type: application/json" );
echo json_encode($res);
die();
}
//Process the AJAX requests
add_action("wp_ajax_nopriv_cashify_exchange", "cashify_exchange_function");
add_action("wp_ajax_cashify_exchange", "cashify_exchange_function");
?>