<?php   

                            include 'connection.php';
                            $p_APP_ROLL_NO =$_GET['p_APP_ROLL_NO']; 
                            $p_RESULT_CODE =''; 
                            $p_PAYMENT_ID =$_GET['p_PAYMENT_ID']; 
                            $p_TRX_ID =$_GET['p_TRX_ID']; 
                            $p_TRX_STATUS =$_GET['p_TRX_STATUS']; 
                            $p_AMOUNT =$_GET['p_AMOUNT']; 
                            $p_CURRENCY =$_GET['p_CURRENCY']; 
                            $p_INTENT =$_GET['p_INTENT']; 
                            $p_INV_NO =$_GET['p_INV_NO']; 
                            $p_MSISDN =$_GET['p_MSISDN']; 
                            $p_TRX_DATE =$_GET['p_TRX_DATE'];     
                            $returnval=0;
        $stid = oci_parse($conn, "begin PKG_AD_APP_PAYMENT.DPD_AD_APP_PAYMENT1(:o_status,:p_APP_ROLL_NO,:p_RESULT_CODE,:p_PAYMENT_ID,:p_TRX_ID,:p_TRX_STATUS,:p_AMOUNT,:p_CURRENCY,:p_INTENT,:p_INV_NO,:p_MSISDN,:p_TRX_DATE); end;");


        oci_bind_by_name($stid, ":o_status", $returnval, -1, SQLT_INT);
        oci_bind_by_name($stid, ":p_APP_ROLL_NO", $p_APP_ROLL_NO, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_RESULT_CODE", $p_RESULT_CODE, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_PAYMENT_ID", $p_PAYMENT_ID, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_TRX_ID", $p_TRX_ID, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_TRX_STATUS", $p_TRX_STATUS, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_AMOUNT", $p_AMOUNT, -1, SQLT_INT); 
        oci_bind_by_name($stid, ":p_CURRENCY", $p_CURRENCY, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_INTENT", $p_INTENT, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_INV_NO", $p_INV_NO, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_MSISDN", $p_MSISDN, -1, SQLT_CHR); 
        oci_bind_by_name($stid, ":p_TRX_DATE", $p_TRX_DATE, -1, SQLT_CHR);     
        oci_execute($stid);

    //print $returnval;
        $myObj = new stdClass();
        $myObj->result = $returnval;

        $myJSON = json_encode($myObj);

        echo $myJSON;

    oci_free_statement($stid);
    oci_close($conn);



    ?>    
