示例#1
0
    public void _CallFundTransferAPI(string mobile_no, string sender_profile_id, string beneficiary_id, string account_no, int amount, long client_id, string transfer_mode = "IMPS")
    {
        APICallAndTokenGenerate objAPI = new APICallAndTokenGenerate();

        APICallAndTokenGenerate.GetTransactionStatusResponse objResponse = objAPI.CallFundTransferAPI(mobile_no, sender_profile_id, beneficiary_id, amount, client_id, transfer_mode);
        if (objResponse.error_code.Equals("1"))
        {
            //Transaction is failure
            //print objResponse.message;
        }
        if (objResponse.error_code.Equals("0"))
        {
            string transaction_id = objResponse.transaction_details.transaction_id; // Store transaction id in your db to know the status of transaction
            if (objResponse.transaction_details.status.Equals("Success"))
            {
                //successful transaction
            }
            if (objResponse.transaction_details.status.Equals("Pending"))
            {
                //wait for bank response transaction is hold at bank side due to server or network issue.
                //call transaction status api after 30 minute to check latest status
            }
            if (objResponse.transaction_details.status.Equals("Failure"))
            {
                //Transaction is refund to wallet
            }
        }
    }
示例#2
0
    public void _CallTransactionStatusAPI(string transaction_id)
    {
        APICallAndTokenGenerate objAPI = new APICallAndTokenGenerate();

        APICallAndTokenGenerate.GetTransactionStatusResponse objResponse = objAPI.CallTransactionStatusAPI(transaction_id);
        if (objResponse.error_code.Equals("1"))
        {
            //print objResponse.message;
            //display error message
        }
        if (objResponse.error_code.Equals("0"))
        {
            if (objResponse.transaction_details.status.Equals("Success"))
            {
                //successful transaction
            }
            if (objResponse.transaction_details.status.Equals("Pending"))
            {
                //wait for bank response transaction is hold at bank side due to server or network issue.
                //call transaction status api after 30 minute to check latest status
            }
            if (objResponse.transaction_details.status.Equals("Failure"))
            {
                //Transaction is refund to wallet
            }
        }
    }