<?php

$test = TRUE;
if (true) {
    $res = json_decode(file_get_contents('php://input'));
    $ref = explode("-", $res->BillRefNumber);
    if (!isset($ref[0]) || empty($ref[0])) {
        $test = FALSE;
    }
    if (!isset($ref[1]) || empty($ref[1])) {
        //$test = FALSE;
    }
}

//error_log('Successfully Called');
header("Content-Type:application/json");
if($test){
    echo '{"ResultCode":0, "ResultDesc":"sucessful validation", "ThirdPartyTransID": 0}';
} else {
    echo '{"ResultCode":1, "ResultDesc":"Confirmation Service not accepted", "ThirdPartyTransID": 0}';
}
?>


