hugobritobh / cielo3.0 Goto Github PK
View Code? Open in Web Editor NEWC#, HttpClient, Net Standard 2.0, Xamarin, Portable
License: MIT License
C#, HttpClient, Net Standard 2.0, Xamarin, Portable
License: MIT License
Estou tendo um erro ao tentar criar um pagamento usando recorrência.
Usando o GetCieloErrors():
[
{
"Code":0,
"Message":"Error code InternalServerError."
}
]
Estou montando a transação dessa maneira:
var customer = new Customer(user.FullName);
var card = new Card(input.CartaoNumero, input.CartaoNomeImpresso, input.CartaoExpiracao, input.CartaoCodigo, input.CartaoBandeira);
var recurrent = new RecurrentPayment(plano.Intervalo, DateTime.Today.AddYears(5));
var payment = new Payment(plano.Valor, Currency.BRL, 1, true, null, card, recurrentPayment: recurrent);
var transaction = new Transaction(orderId, customer, payment);
E o objeto gerado que é enviado no CreateTransactionAsync() fica assim:
{
"MerchantOrderId":"e4e5be04-db53-454c-b39b-c9e3faeb97ec",
"Customer":{
"Name":"admin admin",
"Identity":null,
"IdentityType":null,
"Email":null,
"Birthdate":null,
"Address":null,
"DeliveryAddress":null
},
"Payment":{
"Installments":1,
"Interest":null,
"Capture":true,
"Authenticate":null,
"Recurrent":null,
"RecurrentPayment":{
"RecurrentPaymentId":null,
"AuthorizeNow":true,
"StartDate":null,
"EndDate":"2025-07-09",
"NextRecurrency":null,
"Interval":"Monthly",
"Links":null,
"ReasonCode":null,
"ReasonMessage":null,
"SuccessfulRecurrences":0,
"RecurrentTransactions":null,
"Status":null
},
"CreditCard":{
"CardNumber":"0000000000000001",
"CardToken":null,
"Holder":"TESTE",
"CustomerName":null,
"ExpirationDate":"08/2020",
"SecurityCode":"123",
"SaveCard":false,
"Brand":"Visa"
},
"Tid":null,
"ProofOfSale":null,
"AuthorizationCode":null,
"AuthenticationUrl":null,
"BoletoNumber":null,
"Instructions":null,
"Country":"BRA",
"ExtraDataCollection":null,
"ExpirationDate":null,
"Url":null,
"Number":null,
"BarCodeNumber":null,
"DigitableLine":null,
"Address":null,
"SoftDescriptor":null,
"ReturnUrl":"",
"Wallet":null,
"Provider":null,
"PaymentId":null,
"Type":"CreditCard",
"ServiceTaxAmount":null,
"Amount":"544",
"CapturedAmount":null,
"ReceivedDate":null,
"CapturedDate":null,
"FraudAnalysis":null,
"Currency":"BRL",
"DebitCard":null,
"CardToken":null,
"ReturnCode":null,
"ReturnMessage":null,
"ReasonCode":null,
"ReasonMessage":null,
"ProviderReturnCode":null,
"ProviderReturnMessage":null,
"Status":null,
"Links":null
}
}
Olá Hugo, tudo bem ?
Estive configurando em um cliente a api 3.0 para asp.net 4.5
E estou tendo uma situação com a class Address.
Dentro do código que eu puxei e também na consulta aqui no Git, me parece estar faltando um campo ou não consegui chamar esse campo que é obrigatório: Address.District.
Aparentemente é obrigatório mas não possui dentro do código, como posso proceder?
Obrigado desde já!
Olá,
Pela documentação da Cielo seria possível criar uma transação recorrente sem informar uma data fim.
Seria possível alterar o contrutor de RecurrentPayment para permitir isso?
Será que só assim eu consigo o mesmo efeito?
var recurrent = new RecurrentPayment();
recurrent.SetInterval(meuintervalo);
Obrigado
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.