Пример #1
0
        public Contract.Dto.Fee CalculateFee(Contract.Dto.Transaction transactionRecord)
        {
            var transaction = _mapper.Map(transactionRecord);
            var fee         = _feeCalculator.CalculateFee(transaction);
            var totalFee    = _feeCalculator.AddExtraFees(fee, _extraFees);

            return(_mapper.Map(totalFee));
        }
Пример #2
0
        public Transaction Map(Contract.Dto.Transaction transaction)
        {
            if (transaction == null)
            {
                return(null);
            }

            return(new Transaction(
                       transaction.MerchantName,
                       transaction.Date,
                       transaction.Amount));
        }