Remove payment installment payment

0

I am implementing payment with the pagseguro API, everything works perfectly, the problem is that I do not want to offer installment or freight, I have these variables that I move to an array (it sends the payment data), I already I tried removing it from the array, but it gives error, example of variables:

$shippingCost = '10.00'; //Frete
$installmentQuantity = 3; // Quantidade de Parcelas com Juros
$noInterestInstallmentQuantity = 3; // Quantidade de Parcelas sem Juros
$installmentValue = '30.00'; // Valor das Parcelas
    
asked by anonymous 21.09.2018 / 23:59

1 answer

0

I would need to see more of your code to find out how it works, but at the beginning, this $ installmentQuantity variable should be equal to 1, which is the value of 1 (one) installment, the revolving value of the card that is the equivalent of no installment . And $ installmentValue must be the total value of the request.

$shippingCost = '0.00';
$installmentQuantity = 1;
$installmentValue = $totalPedido;

If you are using the code provided by the pagseguro API in php, you can define it as follows:

$creditCard->setInstallment()->withParameters($installmentsQty, $installmentValue, 3);

where: $ installmentsQty is the amount of installments, it would be 1, $ installmentValue is the value of each installment, as it is only a installment, it would be the total value of the installment. And finally, the third parameter does not matter what value you leave, from 1 to 12, this parameter only defines the maximum number of installments possible without interest.

    
26.10.2018 / 22:08