joomla 2.5, vm 2.0.6
if a customer redeems a coupon for 100% of the value, so price is equal to $0 and clicks next i get
* Info: Payment Amount not valid for Paypal
Thank you for your order!
Your order has been processed.
i know the awo coupon works 100% but i am desperate for help.
vm forums hinted at this fix but it refers to vm 2.0.2 only and unable to get it working on 2.0.6.
"This worked perfectly. I did make one change. Below is what I have In plugins/vmpayment/paypal/paypal.php starting at about line 252"
Code: [Select]
if a customer redeems a coupon for 100% of the value, so price is equal to $0 and clicks next i get
* Info: Payment Amount not valid for Paypal
Thank you for your order!
Your order has been processed.
i know the awo coupon works 100% but i am desperate for help.
vm forums hinted at this fix but it refers to vm 2.0.2 only and unable to get it working on 2.0.6.
"This worked perfectly. I did make one change. Below is what I have In plugins/vmpayment/paypal/paypal.php starting at about line 252"
Code: [Select]
<?php
// 2 = don't delete the cart, don't send email and don't redirect
//return $this->processConfirmedOrderPaymentResponse(2, $cart, $order, $html, $dbValues['payment_name'], $new_status);
// coupon mod by Supermac begins, also commented out line 253
if ($totalInPaymentCurrency > 0 ){
return $this->processConfirmedOrderPaymentResponse(2, $cart, $order, $html, $dbValues['payment_name'], $new_status);
} else {
$html = '<table>' . "\n";
$html .= $this->getHtmlRow('STANDARD_PAYMENT_INFO', $dbValues['payment_name']);
if (!empty($payment_info)) {
$lang = & JFactory::getLanguage();
if ($lang->hasKey($method->payment_info)) {
$payment_info = JText::_($method->payment_info);
} else {
$payment_info = $method->payment_info;
}
$html .= $this->getHtmlRow('STANDARD_PAYMENTINFO', $payment_info);
}
if (!class_exists('VirtueMartModelCurrency'))
require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php');
$currency = CurrencyDisplay::getInstance('', $order['details']['BT']->virtuemart_vendor_id);
$html .= $this->getHtmlRow('STANDARD_ORDER_NUMBER', $order['details']['BT']->order_number);
$html .= $this->getHtmlRow('STANDARD_AMOUNT', $currency->priceDisplay($order['details']['BT']->order_total));
$html .= '</table>' . "\n";
return $this->processConfirmedOrderPaymentResponse(true, $cart, $order, $html, $dbValues['payment_name'],'C');
}
// coupon mod by Supermac ends
?>