Ejemplo n.º 1
0
        public async Task <Transaction> CancelPayment(Transaction transaction)
        {
            var service = new PaymentService(_config.DefaultApiKey, _config.DefaultEncryptionKey);

            var transactionGateway = MapToGateway(transaction, service);

            return(MapTransaction(await transactionGateway.CancelAuthorization()));
        }
Ejemplo n.º 2
0
 public CrossCutting.Models.Transaction MapToGateway(Transaction transaction, PaymentService service)
 {
     return(new CrossCutting.Models.Transaction(service)
     {
         Status = (CrossCutting.Enumerables.TransactionStatus)transaction.Status,
         Amount = transaction.Amount,
         CardBrand = transaction.CardBrand,
         AuthorizationCode = transaction.AuthorizationCode,
         Cost = transaction.Cost,
         Nsu = transaction.Nsu,
         Tid = transaction.Tid
     });
 }