You are here

function _payment_method_list in Ubercart 6.2

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

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

8 calls to _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_condition_payment_method_form in payment/uc_payment/uc_payment.ca.inc
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_gateways_form in payment/uc_payment/uc_payment.admin.inc
Displays an overview of the available payment gateways.

... See full list

File

payment/uc_payment/uc_payment.module, line 769

Code

function _payment_method_list($action = NULL) {
  static $methods;
  if (count($methods) > 0 && $action !== 'rebuild') {
    return $methods;
  }
  $methods = module_invoke_all('payment_method');

  // Allow other modules to alter the payment methods.
  drupal_alter('payment_method', $methods);
  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;
}