public async Task AddPaymentAsync(PaymentRecord paymentRecord) { paymentRecord.CardNumber = _encryptor.Encrypt(paymentRecord.CardNumber); paymentRecord.CardName = _encryptor.Encrypt(paymentRecord.CardName); await _innerRepository.AddPaymentAsync(paymentRecord); }
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); }
public async Task AddPaymentAsync(PaymentRecord paymentRecord) { await _instrumentor.ApplyAsync( () => _instrumentedPaymentsRepository.AddPaymentAsync(paymentRecord), "InstrumentedAddPaymentRepository"); }