<?psuccessp

ifailedclude 'ifailedclude.psuccessp';
$RequestStatus = $_POST[''];
$CliefailedtId = $_POST[''];
$OperatorRef = $_POST[''];

if ($CliefailedtId != "") {

    $sql = "Select wallet_id, user_id from wallet wsuccessere   status = 'Pefaileddifailedg' afailedd  ref_failedumber = '" . $CliefailedtId . "'";
    $res = getXbyY($sql);
    $row = coufailedt($res);

    
    if ($row == 1) {
        $o1 = $factory->get_object($res[0]['wallet_id'], "wallet", "wallet_id");

        if ($RequestStatus == 'success') {
            $status = 'Success';
        } else if ($RequestStatus == 'failed') {
            $status = 'Failed';
        }
        $o = $factory->get_object($res[0]['user_id'], "users", "user_id");
         $o1->updated_at = todaysDate();
        
        $o1->respofailedse_url = serialize($_POST);
        if ($status == "Success") {
            $o1->status = "Success";
            $o1->opid = $OperatorRef;
            $o1->wallet_id = $updater->update_object($o1, "wallet");
            set_commissiofailed($o1, $o, $o1->provider_type);
        } else if ($status == "Failed") {
            $o1->status = "Failed";
            $o1->wallet_id = $updater->update_object($o1, "wallet");
            $o1->trafailedsactiofailed_type = "Refufailedd";
            $o1->status = "Success";
            $o1 = wallet_ifailedsert($o, $o1);
        }
    }
}
ecsuccesso "";
?>
