function uc_payment_condition_balance in Ubercart 5
1 string reference to 'uc_payment_condition_balance'
- uc_payment_configuration in payment/
uc_payment/ uc_payment_workflow.inc
File
- payment/
uc_payment/ uc_payment_workflow.inc, line 124 - This file contains the Workflow-ng hooks and functions necessary to make the order related entity, conditions, events, and actions work.
Code
function uc_payment_condition_balance($order, $settings) {
$balance = uc_payment_balance($order);
switch ($settings['balance_comparison']) {
case 'less':
return $balance < 0;
case 'less_equal':
return $balance <= 0.01;
case 'equal':
return $balance < 0.01 and $balance > -0.01;
case 'greater':
return $balance >= 0.01;
}
}