Hello, I'm having problems with my payment plugin after I updated my AWOCUPOM
The coupon discount is not being passed on to the checkout my payment method PayPal / PagSeguro
My version of Virtuemart>
I believe the AWOCUPOM has changed the name of any assignment
Could you help me figure out which would be to fix the bug?
The coupon discount is not being passed on to the checkout my payment method PayPal / PagSeguro
My version of Virtuemart>
I believe the AWOCUPOM has changed the name of any assignment
Could you help me figure out which would be to fix the bug?
<?php
if (!empty($cart->couponCode)) {
//Correção valor cupom de desconto para 2.0.20+ (antes os descontos eram salvos como valores positivos, agora como negativos(o correto))
if($cart->pricesUnformatted['salesPriceCoupon'] > 0){
$ValorCupom = (round($cart->pricesUnformatted['salesPriceCoupon'], 2)*-1);
} else {
$ValorCupom = round($cart->pricesUnformatted['salesPriceCoupon'], 2);
}
$paymentRequest->setExtraAmount($ValorCupom + round($cart->pricesUnformatted ['salesPricePayment'], 2));
}else{
$paymentRequest->setExtraAmount(round($cart->pricesUnformatted ['salesPricePayment'], 2));
}
?>