コード例 #1
0
        public PendingDebitResp PendingDebit([FromBody] PendingDebitReq pendingDebitReq)
        {
            HttpRequestHeaders headers          = this.Request.Headers;
            PendingDebitReq    pendingDebitReq1 = new PendingDebitReq()
            {
                AccountNo = pendingDebitReq.AccountNo
            };

            if (CBNController.ValidateToken(headers.GetValues("Authorization").First <string>().ToString().Substring("Bearer ".Length).Trim()))
            {
                this.logger.Info <PendingDebitReq>("Request {@value}", pendingDebitReq);
                CBNIntegration.Models.PendingDebit[] array = this.cBNIntegrationData.PendingDebit(pendingDebitReq1).ToArray();
                int length = array.Length;
                PendingDebitResp pendingDebitResp = new PendingDebitResp()
                {
                    Status = this.success.ResponseCode,
                    Msg    = this.success.ResponseMessage,
                    Result = array
                };
                this.logger.Info <PendingDebitResp>("Response {@value}", pendingDebitResp);
                return(pendingDebitResp);
            }
            PendingDebitResp pendingDebitResp1 = new PendingDebitResp()
            {
                Status = this.failed.ResponseCode,
                Msg    = this.failed.ResponseMessage
            };

            this.logger.Info <PendingDebitResp>("Response {@value}", pendingDebitResp1);
            return(pendingDebitResp1);
        }
コード例 #2
0
        public AccountDetailsResp AccountDetails([FromBody] CBNIntegration.Models.AccountDetails accountDetails)
        {
            if (CBNController.ValidateToken(this.Request.Headers.GetValues("Authorization").First <string>().ToString().Substring("Bearer ".Length).Trim()))


            {
                AccountDetailsReq accountDetailsReq = new AccountDetailsReq()
                {
                    AccountNo = accountDetails.ACCOUNTNO
                };
                this.logger.Info <AccountDetailsReq>("Request {@value}", accountDetailsReq);
                CBNIntegration.Models.AccountDetails[] array = this.cBNIntegrationData.AccountDetails(accountDetailsReq).ToArray();
                int length = array.Length;
                AccountDetailsResp accountDetailsResp = new AccountDetailsResp()
                {
                    Status = this.success.ResponseCode,
                    Msg    = this.success.ResponseMessage,
                    Result = array
                };
                this.logger.Info <AccountDetailsResp>("Response {@value}", accountDetailsResp);
                return(accountDetailsResp);
            }
            AccountDetailsResp accountDetailsResp1 = new AccountDetailsResp()
            {
                Status = this.failed.ResponseCode,
                Msg    = this.failed.ResponseMessage
            };

            this.logger.Info <AccountDetailsResp>("Response {@value}", accountDetailsResp1);
            return(accountDetailsResp1);
        }
コード例 #3
0
        public ClosedStatisticsResp ClosedStatistics(
            [FromBody] ClosedStatisticsReq closedStatisticsReq)
        {
            if (CBNController.ValidateToken(this.Request.Headers.GetValues("Authorization").First <string>().ToString().Substring("Bearer ".Length).Trim()))
            {
                this.logger.Info <ClosedStatisticsReq>("Request {@value}", closedStatisticsReq);
                CBNIntegration.Models.ClosedStatistics[] array = this.cBNIntegrationData.ClosedStatistics().ToArray();
                int length = array.Length;
                ClosedStatisticsResp closedStatisticsResp = new ClosedStatisticsResp()
                {
                    Status = this.success.ResponseCode,
                    Msg    = this.success.ResponseMessage,
                    Result = array
                };
                this.logger.Info <ClosedStatisticsResp>("Response {@value}", closedStatisticsResp);
                return(closedStatisticsResp);
            }
            ClosedStatisticsResp closedStatisticsResp1 = new ClosedStatisticsResp()
            {
                Status = this.failed.ResponseCode,
                Msg    = this.failed.ResponseMessage
            };

            this.logger.Info <ClosedStatisticsResp>("Response {@value}", closedStatisticsResp1);
            return(closedStatisticsResp1);
        }
コード例 #4
0
        public TransactionDetailsChannelsResp TransactionDetailsChannels(
            [FromBody] TransactionDetailsChannelsReq transactionDetailsChannelsReq)
        {
            if (CBNController.ValidateToken(this.Request.Headers.GetValues("Authorization").First <string>().ToString().Substring("Bearer ".Length).Trim()))

            {
                TransactionDetailsChannelsReq transactionDetailsChannelsReq1 = new TransactionDetailsChannelsReq()
                {
                    StartDate = this.dateConvert(transactionDetailsChannelsReq.StartDate),
                    EndDate   = this.dateConvert(transactionDetailsChannelsReq.EndDate),
                    AccountNo = transactionDetailsChannelsReq.AccountNo
                };
                this.logger.Info <TransactionDetailsChannelsReq>("Request {@value}", transactionDetailsChannelsReq1);
                CBNIntegration.Models.TransactionDetailsChannels[] array = this.cBNIntegrationData.TransactionDetailsChannels(transactionDetailsChannelsReq1).ToArray();
                int length = array.Length;
                TransactionDetailsChannelsResp detailsChannelsResp = new TransactionDetailsChannelsResp()
                {
                    Status = this.success.ResponseCode,
                    Msg    = this.success.ResponseMessage,
                    Result = array
                };
                this.logger.Info <TransactionDetailsChannelsResp>("Response {@value}", detailsChannelsResp);
                return(detailsChannelsResp);
            }
            TransactionDetailsChannelsResp detailsChannelsResp1 = new TransactionDetailsChannelsResp()
            {
                Status = this.failed.ResponseCode,
                Msg    = this.failed.ResponseMessage
            };

            this.logger.Info <TransactionDetailsChannelsResp>("Response {@value}", detailsChannelsResp1);
            return(detailsChannelsResp1);
        }
コード例 #5
0
        public ListInternalAccountsFullResp ListInternalAccountsFull(
            [FromBody] ListInternalAccountsFullReq listInternalAccountsFullReq)
        {
            string AuthToken = this.Request.Headers.GetValues("Authorization").First <string>().ToString().Substring("Bearer ".Length).Trim();
            ListInternalAccountsFullReq listInternalAccountsFullReq1 = new ListInternalAccountsFullReq()
            {
                LedgerCode = listInternalAccountsFullReq.LedgerCode
            };

            if (CBNController.ValidateToken(AuthToken))
            {
                this.logger.Info <ListInternalAccountsFullReq>("Request {@value}", listInternalAccountsFullReq1);
                CBNIntegration.Models.ListInternalAccountsFull[] array = this.cBNIntegrationData.ListInternalAccountsFull(listInternalAccountsFullReq1).ToArray();
                int length = array.Length;
                ListInternalAccountsFullResp accountsFullResp = new ListInternalAccountsFullResp()
                {
                    Status = this.success.ResponseCode,
                    Msg    = this.success.ResponseMessage,
                    Result = array
                };
                this.logger.Info <ListInternalAccountsFullResp>("Response {@value}", accountsFullResp);
                return(accountsFullResp);
            }
            ListInternalAccountsFullResp accountsFullResp1 = new ListInternalAccountsFullResp()
            {
                Status = this.failed.ResponseCode,
                Msg    = this.failed.ResponseMessage
            };

            this.logger.Info <ListInternalAccountsFullResp>("Response {@value}", accountsFullResp1);
            return(accountsFullResp1);
        }
コード例 #6
0
        public ListLedgerCodesResp ListLedgerCodes(ListLedgerCodesReq listLedgerCodesReq)
        {
            if (CBNController.ValidateToken(this.Request.Headers.GetValues("Authorization").First <string>().ToString().Substring("Bearer ".Length).Trim()))
            {
                this.logger.Info <ListLedgerCodesReq>("Request {@value}", listLedgerCodesReq);
                CBNIntegration.Models.ListLedgerCodes[] array = this.cBNIntegrationData.ListLedgerCodes().ToArray();
                int length = array.Length;
                ListLedgerCodesResp listLedgerCodesResp = new ListLedgerCodesResp()
                {
                    Status = this.success.ResponseCode,
                    Msg    = this.success.ResponseMessage,
                    Result = array
                };
                this.logger.Info <ListLedgerCodesResp>("Response {@value}", listLedgerCodesResp);
                return(listLedgerCodesResp);
            }
            ListLedgerCodesResp listLedgerCodesResp1 = new ListLedgerCodesResp()
            {
                Status = this.failed.ResponseCode,
                Msg    = this.failed.ResponseMessage
            };

            this.logger.Info <ListLedgerCodesResp>("Response {@value}", listLedgerCodesResp1);
            return(listLedgerCodesResp1);
        }
コード例 #7
0
        public SignatoriesResp Signatories([FromBody] SignatoriesReq signatoriesReq)
        {
            if (CBNController.ValidateToken(this.Request.Headers.GetValues("Authorization").First <string>().ToString().Substring("Bearer ".Length).Trim()))
            {
                SignatoriesReq signatoriesReq1 = new SignatoriesReq()
                {
                    AccountNo = signatoriesReq.AccountNo
                };
                this.logger.Info <SignatoriesReq>("Request {@value}", signatoriesReq1);
                CBNIntegration.Models.Signatories[] array = this.cBNIntegrationData.Signatories(signatoriesReq1).ToArray();
                int             length          = array.Length;
                SignatoriesResp signatoriesResp = new SignatoriesResp()
                {
                    Status = this.success.ResponseCode,
                    Msg    = this.success.ResponseMessage,
                    Result = array
                };
                this.logger.Info <SignatoriesResp>("Response {@value}", signatoriesResp);
                return(signatoriesResp);
            }
            SignatoriesResp signatoriesResp1 = new SignatoriesResp()
            {
                Status = this.failed.ResponseCode,
                Msg    = this.failed.ResponseMessage
            };

            this.logger.Info <SignatoriesResp>("Response {@value}", signatoriesResp1);
            return(signatoriesResp1);
        }