VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: inode64 on October 11, 2015, 00:15:13 AM

Title: New feature; Minimum fee per transaction in payment
Post by: inode64 on October 11, 2015, 00:15:13 AM
Joomla 3.4.x
Virtuemart 3.0.9.4

Specify a minimum amount in payment type , useful for commissions and overhead.
Title: Re: New feature; Minimum fee per transaction in payment
Post by: Milbo on October 14, 2015, 11:14:22 AM
Taken :-)

But I had to change it a bit

$min = !empty($method->cost_min_transaction)? $method->cost_min_transaction: 0.0;
return ($method->cost_per_transaction + (($cost_percent < $min) ? $method->cost_min_transaction : $cost_percent));


Imho more robust to check with !empty first