<?php
include "include.php";
$r_id = getXbyY("SELECT * FROM request_money WHERE ref_number = '".$_REQUEST['client_txn_id']."' ORDER BY ref_number DESC");
if($r_id[0]){
    if($r_id[0]['status'] == "Transferred"){
        $error['status'] = "Success";
        $error['error'] = 0;
        echo json_encode($error);die;
        $error['error_msg'] = "Wallet Credited Successfuly.";
    }else if($r_id[0]['status'] == "Rejected"){
        $error['status'] = "Failed";
        $error['error'] = 0;
        $error['error_msg'] = "Trasaction is failed please try again.";
        echo json_encode($error);die;
    }else{
        $error['status'] = "Pending";
        $error['error'] = 0;
        $error['error_msg'] = "Trasaction is hold contact service provider.";
        echo json_encode($error);die;
    }
}else{
    $error['error'] =1;
    $error['error_msg'] = "Something went wrong.";
    echo json_encode($error);die;
}


//echo "<pre>";print_r($r_id);die;
