Exemplo n.º 1
0
        // Shopkeeper Balance
        public string ShopkeeperBalance(string ChangerQS)
        {
            _shopkeeperBalance         = ChangerUtils.URLSplitter <ShopKeeperSenderAndReceiverBalance>(ChangerQS, out IsRequestDTOSuccess);
            _shopkeeperBalanceResponse = new ShopkeeperSenderAndReceiverBalanceResponse();
            try {
                if (IsRequestDTOSuccess)
                {
                    _shopkeeperBalanceResponse = _terminalService.GetShopKeeperBalance(_shopkeeperBalance);
                }
                else
                {
                    _shopkeeperBalanceResponse.ErrorNumber  = 1303;
                    _shopkeeperBalanceResponse.ErrorMessage = ConfigurationManager.AppSettings[_shopkeeperBalanceResponse.ErrorNumber.ToString()];
                }
            } catch (ChangerMintsError Er) {
                _logerr.LogError(Er.Message, Er, LogType.Error);
                return(ChangerUtils.ResponseConcatenater <ChangerMintsError>(Er, true));
            } catch (Exception ex) {
                string message = string.Format("Class Name:{0},Method Name:{1},Error:{2}", this.GetType().Name, "ShopkeeperBalance", ex.InnerException == null ? ex.Message : ex.InnerException.Message);
                _logerr.LogError(message, ex, LogType.Error);

                _shopkeeperBalanceResponse.ErrorNumber  = 2001;
                _shopkeeperBalanceResponse.ErrorMessage = ConfigurationManager.AppSettings[_shopkeeperBalanceResponse.ErrorNumber.ToString()];
            }
            return(ChangerUtils.ResponseConcatenater <ShopkeeperSenderAndReceiverBalanceResponse>(_shopkeeperBalanceResponse, true));
        }
Exemplo n.º 2
0
        // Shopkeeper to Customer Transaction
        public string ShopkeepertoCustomerTransaction(string ChangerQS)
        {
            _shopkeeperToCustomer     = ChangerUtils.URLSplitter <ShopKeeperToCustomerTransaction>(ChangerQS, out IsRequestDTOSuccess);
            _crossTransactionResponse = new CrossTransactionResponse();

            try {
                if (IsRequestDTOSuccess)
                {
                    _crossTransactionResponse = _terminalService.ShopkeeperToCustomerTransaction(_shopkeeperToCustomer);
                }
                else
                {
                    _crossTransactionResponse.ErrorNumber  = 1303;
                    _crossTransactionResponse.ErrorMessage = ConfigurationManager.AppSettings[_crossTransactionResponse.ErrorNumber.ToString()];
                }
            } catch (ChangerMintsError Er) {
                _logerr.LogError(Er.Message, Er, LogType.Error);
                return(ChangerUtils.ResponseConcatenater <ChangerMintsError>(Er, true));
            } catch (Exception ex) {
                _crossTransactionResponse.ErrorNumber  = 2001;
                _crossTransactionResponse.ErrorMessage = ConfigurationManager.AppSettings[_crossTransactionResponse.ErrorNumber.ToString()];
            }
            return(ChangerUtils.ResponseConcatenater <CrossTransactionResponse>(_crossTransactionResponse, true));
        }