Ola boa noite. Alguém consegue me ajudar por gentileza? Estou tentando testar a criação de link de pagamento utilizando a SDK do .NET e estou recebendo esse erro:
Erro:
{
"code": 3500034,
"error": "validation_error",
"error_description": {
"property": "/items",
"message": "Propriedade desconhecida (não está no schema)."
}
}
Porém eu estou utilizando o próprio exemplo da documentação: https://github.com/efipay/sdk-dotnet-apis-efi/blob/main/Examples/charges/payment-link/CreateOneStepLink.cs
Meu código está assim:
using Efipay;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BackendAzure.Efi
{
public class Link
{
public static void GenerateLink()
{
dynamic efi = new EfiPay(JObject.Parse(File.ReadAllText("credentials.json")));
var body = new
{
items = new[] {
new {
name = "Product 1",
value = 590,
amount = 2
}
},
payment_method = "all",
expire_at = "2025-12-15",
request_delivery_address = false
};
try
{
var response = efi.CreateOneStepLink(null, body);
Console.WriteLine(response);
}
catch (EfiException e)
{
Console.WriteLine(e.ErrorType);
Console.WriteLine(e.Message);
}
}
}
}
Alguém consegue me apontar onde estou falhando? Desde já agradeço