Пример #1
0
        public void MaskCorrectNumber()
        {
            var cardNumber     = "1234567812345678";
            var expectedResult = "123456******5678";

            var result = _cardNumberMaskingService.MaskCardNumber(cardNumber);

            result.Should().Be(expectedResult);
        }
Пример #2
0
        private Database.PaymentDetails CreatePaymentDetails(Contract.Payment payment, PaymentResult result)
        {
            var paymentDetails = _mapper.Map <Database.PaymentDetails>(payment);

            paymentDetails.PaymentId        = result?.PaymentId;
            paymentDetails.PaymentStatus    = result?.PaymentStatus;
            paymentDetails.MaskedCardNumber = _cardNumberMaskingService.MaskCardNumber(payment.CardNumber);
            paymentDetails.TimeStamp        = DateTime.UtcNow;
            return(paymentDetails);
        }