Skip navigation
Help

hook_uc_payment_gateway

7 uc_payment.api.php hook_uc_payment_gateway()

Registers credit card payment gateway callbacks.

Payment gateways handle credit card payments directly, without needing to redirect off-site.

Return value

Returns an array of payment gateways, keyed by the gateway ID, and with the following members:

  • "title": the human-readable name of the payment method.
  • "description": a human-readable description of the payment method.
  • "settings": A callback function that returns the gateway settings form.
  • "credit": A callback function that processes the credit card. See hook_uc_payment_gateway_charge() for details.

See also

http://www.ubercart.org/docs/api/hook_uc_payment_gateway

hook_uc_payment_gateway_charge()

Related topics

4 functions implement hook_uc_payment_gateway()

1 invocation of hook_uc_payment_gateway()

File

ubercart/payment/uc_payment/uc_payment.api.php, line 60
Hooks provided by the Payment module.

Code

function hook_uc_payment_gateway() {
  $gateways['test_gateway'] = array(
    'title' => t('Test gateway'), 
    'description' => t('Process credit card payments through the Test Gateway.'), 
    'credit' => 'test_gateway_charge',
  );
  return $gateways;
}