You are here

function hook_payment_gateway in Ubercart 6.2

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

Registers payment gateway callbacks.

Payment gateways handle payments directly, without needing to redirect off-site. The implementation allows for payment methods other than uc_credit to use gateways, but in practice, they are only used for credit card payments.

Return value

Returns an array of payment gateways, each with the following members:

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

See also

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

hook_payment_gateway_charge()

4 functions implement hook_payment_gateway()

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

test_gateway_payment_gateway in payment/uc_credit/test_gateway.module
Implements hook_payment_gateway().
uc_authorizenet_payment_gateway in payment/uc_authorizenet/uc_authorizenet.module
Implements hook_payment_gateway().
uc_cybersource_payment_gateway in payment/uc_cybersource/uc_cybersource.module
Implements hook_payment_gateway().
uc_paypal_payment_gateway in payment/uc_paypal/uc_paypal.module
Implements hook_payment_gateway().
1 invocation of hook_payment_gateway()
_payment_gateway_list in payment/uc_payment/uc_payment.module
Builds a list of payment gateways defined in the enabled modules.

File

docs/hooks.php, line 970
These are the hooks that are invoked by the Ubercart core.

Code

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