i have a problem when a make a charge,this show me this error:
"The token has already been used" "La tarjeta no pudo ser procesada"
when i do this with a test token this works fine but when i do it with another token this don´t work, this is my implementation.
bool band = true;
Order order;
Expression<Func<Usuario, bool>> exp = (x) => x.IdUsuario == IdUsuario;
UsuarioLoader uLoader = new UsuarioLoader();
var usuario = uLoader.GetElementByProperty(exp);
try
{
order = new conekta.Order().create(@"{
""currency"":""MXN"",
""customer_info"": {
""customer_id"": """+usuario.TokenConekta+@"""
},
""line_items"": [{
""name"": ""Cobro Union"",
""unit_price"": 1000,
""quantity"": 1
}],
""charges"": [{
""payment_method"": {
""type"": ""card"",
""token_id"": """+tokenTarjeta+@"""
},""amount"":1000
}]
}");
}
catch (ConektaException e)
{
band = false;
foreach (JObject obj in e.details)
{
System.Console.WriteLine("\n [ERROR]:\n");
System.Console.WriteLine("message:\t" + obj.GetValue("message"));
System.Console.WriteLine("debug:\t" + obj.GetValue("debug_message"));
System.Console.WriteLine("code:\t" + obj.GetValue("code"));
}
}