You are here

function _payment_method_list in Ubercart 5

Same name and namespace in other branches
  1. 6.2 payment/uc_payment/uc_payment.module \_payment_method_list()

Build a list of payment methods defined in the enabled modules.

10 calls to _payment_method_list()
uc_checkout_pane_payment in payment/uc_payment/uc_payment_checkout_pane.inc
uc_order_pane_payment in payment/uc_payment/uc_payment_order_pane.inc
Handle the Payment order pane.
uc_payment_by_order_form in payment/uc_payment/uc_payment.module
uc_payment_condition_method_form in payment/uc_payment/uc_payment_workflow.inc
uc_payment_gateways_form in payment/uc_payment/uc_payment.module

... See full list

File

payment/uc_payment/uc_payment.module, line 1069

Code

function _payment_method_list($action = NULL) {
  static $methods;
  if (count($methods) > 0 && $action !== 'rebuild') {
    return $methods;
  }
  $methods = module_invoke_all('payment_method');
  foreach ($methods as $i => $value) {
    $methods[$i]['checkout'] = variable_get('uc_payment_method_' . $methods[$i]['id'] . '_checkout', $methods[$i]['checkout']);
    $methods[$i]['weight'] = variable_get('uc_payment_method_' . $methods[$i]['id'] . '_weight', $methods[$i]['weight']);
  }
  usort($methods, 'uc_weight_sort');
  return $methods;
}