1
I am developing a shopping cart that to the amount to reach a certain range it calculates a discount for the customer, I calculate the freight and the value of the freight is correctly added to the value with discount, but I realized that when finalizing the order and pass the values to the PagSeguro
the value goes without the discounts, I pass to them what is requested to me, in this way:
if ($TPFrete == 3){ $peso = 0; $paymentRequest->addItem($cod_prod, $nome_prod, $quantidade_prod, $vlr, $peso); } else { $paymentRequest->addItem($cod_prod, $nome_prod, $quantidade_prod, $vlr, $peso, $VLRFrete); }
I believe on the page of PagSeguro
He calculates the quantity x value and then the discount does not appear, is there any way to pass the value of this discount to Pagseguro?
I saw that you have an option in the documentation that makes it possible to calculate discount, this here:
$paymentRequest->setExtraAmount
But I already have the calculated amount before I pass to them, is there any hint? The service of Pagseguro did not return my questions, so this post here, I believe to be even faster.
Hello @Eduardo, thanks for the tip, I had already read the documentation, but as I said in the post, I already have the amount calculated, I would like to send it and not calculate
– adventistapr