lfreneda / Cielo

Integração e-Commerce Cielo em .NET
MIT License
10 stars 12 forks source link

Bug, security code removing left zero and broken tests #1

Closed jroliveira closed 10 years ago

jroliveira commented 10 years ago

When a user buys with a security code that starts with zero, Cielo returns the error below:

Cielo.Responses.Exceptions.ResponseException: O XML informado n o valido: - string value '11' does not match pattern for type of codigo-seguranca element in DadosCartao in namespace http://ecommerce.cbmp.com.br: ''

This error occurs because the user input is, for example, 011 and the variable security code is a type int, so the left zero is removed sending only 11 to Cielo.