function _uc_payment_method_list in Ubercart 7.3
Builds a list of payment methods defined in the enabled modules.
10 calls to _uc_payment_method_list()
- uc_checkout_pane_payment in payment/
uc_payment/ uc_payment_checkout_pane.inc - @file Checkout pane functions for uc_payment.module.
- uc_order_handler_filter_payment_method::get_value_options in uc_order/
views/ uc_order_handler_filter_payment_method.inc - Overrides views_handler_filter_in_operator::get_value_options().
- uc_order_pane_payment in payment/
uc_payment/ uc_payment_order_pane.inc - Handles the Payment order pane.
- uc_payment_by_order_form in payment/
uc_payment/ uc_payment.admin.inc - Displays a list of payments attached to an order.
- uc_payment_default_rules_configuration in payment/
uc_payment/ uc_payment.rules_defaults.inc - Implements hook_default_rules_configuration().
File
- payment/
uc_payment/ uc_payment.module, line 594
Code
function _uc_payment_method_list($action = NULL) {
static $methods = array();
if (count($methods) > 0 && $action !== 'rebuild') {
return $methods;
}
foreach (module_invoke_all('uc_payment_method') as $id => $method) {
// Preserve backward compatibility for methods with no key specified.
if (is_numeric($id)) {
$id = $method['id'];
}
$methods[$id] = array_merge($method, array(
'id' => $id,
'checkout' => variable_get('uc_payment_method_' . $id . '_checkout', $method['checkout']),
'weight' => variable_get('uc_payment_method_' . $id . '_weight', $method['weight']),
));
}
// Allow other modules to alter the payment methods.
drupal_alter('uc_payment_method', $methods);
uasort($methods, 'uc_weight_sort');
return $methods;
}