public static CancellationRequest create(Transaction transaction, int total)
        {
            var cancellationRequest = new CancellationRequest {
                id      = transaction.order.number,
                versao  = Cielo.VERSION,
                tid     = transaction.tid,
                dadosEc = new DadosEcElement {
                    numero = transaction.merchant.id,
                    chave  = transaction.merchant.key
                },
                valor = total
            };

            return(cancellationRequest);
        }
		public static CancellationRequest create (Transaction transaction, int total)
		{
			var cancellationRequest = new CancellationRequest {
                id = Guid.NewGuid().ToString(),
				versao = Cielo.VERSION,
				tid = transaction.tid,
				dadosEc = new DadosEcElement {
					numero = transaction.merchant.id,
					chave = transaction.merchant.key
				},
				valor = total
			};

			return cancellationRequest;
		}
Beispiel #3
0
        public static CancellationRequest create(string tid, Merchant merchant, int total)
        {
            var cancellationRequest = new CancellationRequest
            {
                id      = Guid.NewGuid().ToString(),
                versao  = Cielo.VERSION,
                tid     = tid,
                dadosEc = new DadosEcElement
                {
                    numero = merchant.id,
                    chave  = merchant.key
                },
                valor = total
            };

            return(cancellationRequest);
        }
 public static CancellationRequest create(Transaction transaction)
 {
     return(CancellationRequest.create(transaction, transaction.order.total));
 }