You are here

function hook_payment_method in Ubercart 5

Same name and namespace in other branches
  1. 6.2 docs/hooks.php \hook_payment_method()

Register callbacks for payment methods.

Payment methods are different ways to collect payment. By default, Übercart comes with support for check, credit card, and generic payments. Payment methods show up at checkout or on the order administration screens, and they collect different sorts of information from the user that is used to process or track the payment.

Return value

An array of payment methods.

4 functions implement hook_payment_method()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

uc_2checkout_payment_method in payment/uc_2checkout/uc_2checkout.module
Implementation of hook_payment_method().
uc_credit_payment_method in payment/uc_credit/uc_credit.module
Implementation of hook_payment_method().
uc_payment_pack_payment_method in payment/uc_payment_pack/uc_payment_pack.module
Implementation of hook_payment_method().
uc_paypal_payment_method in payment/uc_paypal/uc_paypal.module
Implementation of hook_payment_method().
1 invocation of hook_payment_method()
_payment_method_list in payment/uc_payment/uc_payment.module
Build a list of payment methods defined in the enabled modules.

File

docs/hooks.php, line 777
These are the hooks that are invoked by the Übercart core.

Code

function hook_payment_method() {
  $methods[] = array(
    'id' => 'check',
    'name' => t('Check'),
    'title' => t('Check or Money Order'),
    'desc' => t('Pay by mailing a check or money order.'),
    'callback' => 'uc_payment_method_check',
    'weight' => 1,
    'checkout' => TRUE,
  );
  return $methods;
}