public async Task AddPaymentAsync(PaymentRecord paymentRecord)
        {
            paymentRecord.CardNumber = _encryptor.Encrypt(paymentRecord.CardNumber);
            paymentRecord.CardName   = _encryptor.Encrypt(paymentRecord.CardName);

            await _innerRepository.AddPaymentAsync(paymentRecord);
        }
コード例 #2
0
        public async Task <TransactionResult> CreateTransaction(BankTransaction bankTransaction)
        {
            var transactionResult = await _bankRepository.CreateTransactionAsync(bankTransaction);

            _logger.Write(LogLevel.Information,
                          $"{EventCodes.BankTransactionCreated} - TransactionId: {transactionResult.TransactionId}, TransactionStatus: {transactionResult.TransactionStatus}");

            var payment = GetPaymentRecordFromBankTransaction(transactionResult, bankTransaction);

            await _paymentsRepository.AddPaymentAsync(payment);

            return(transactionResult);
        }
コード例 #3
0
 public async Task AddPaymentAsync(PaymentRecord paymentRecord)
 {
     await _instrumentor.ApplyAsync(
         () => _instrumentedPaymentsRepository.AddPaymentAsync(paymentRecord),
         "InstrumentedAddPaymentRepository");
 }