Good evening, I have a big question. The maxInstallmentNoInterest
method in the javascript call returns: 12 interest-free values, which when calculating the parcel does not equal the total value of amount
.
For example, the total value is 125.32, and 12x is 12 of 10.44. However 10.44x12 = 125.28. Generating error
{"error": {"code": "53041", "message": "installment value invalid value: 10.44"}}
How can I fix this?
My code to generate the plots:
function getParcelas(bandeira) {
PagSeguroDirectPayment.getInstallments({
amount: valor,
maxInstallmentNoInterest: 12,
brand: bandeira,
success: function(response) {
$.each(response.installments, function(i, obj) {
$.each(obj, function(i2, obj2) {
var NumberValue = obj2.installmentAmount;
var Number = "R$ " + NumberValue.toFixed(2).replace(",", ".");
$(".parcelas").show().append("<option value=" + obj2.quantity + ">" + obj2.quantity + "x de " + Number + "</option>");
});
});
}
});
}
Thank you in advance