Example #1
0
    public Result Transact(TransactionRequest tranRequest)
    {
        Result result = new Result();

        try
        {
            if (tranRequest.IsValidTransactRequest())
            {
                result = bll.Transact(tranRequest);
            }
            else
            {
                result.StatusCode = tranRequest.StatusCode;
                result.StatusDesc = tranRequest.StatusDesc;
            }
        }
        catch (Exception ex)
        {
            result.StatusCode = "100";
            result.StatusDesc = "FAILED: " + ex.Message;
        }
        return(result);
    }
Example #2
0
    public Result ValidateTransactionRequest(TransactionRequest tran, string BankCode, string Password)
    {
        Result result = new Result();

        try
        {
            if (tran.IsValidTransactRequest())
            {
                result.StatusCode = "0";
                result.StatusDesc = "SUCCESS";
            }
            else
            {
                result.StatusCode = tran.StatusCode;
                result.StatusDesc = tran.StatusDesc;
            }
        }
        catch (Exception ex)
        {
            result.StatusCode = "100";
            result.StatusDesc = "FAILED: " + ex.Message;
        }
        return(result);
    }