function hook_payment_gateway in Ubercart 5
Same name and namespace in other branches
- 6.2 docs/hooks.php \hook_payment_gateway()
Register payment gateway callbacks.
Return value
Returns an array of payment gateways, which are arrays with the following keys:
- "id"
- type: string
- value: The internal ID of the payment gateway, using a-z, 0-9, and - or _.
 
- "title"
- type: string
- value: The name of the payment gateway displayed to the user. Use t().
 
- "description"
- type: string
- value: A short description of the payment gateway.
 
- "settings"
- type: string
- value: The name of a function that returns an array of settings form elements for the gateway.
 
See also
http://www.ubercart.org/docs/api/hook_payment_gateway
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_payment/ test_gateway.module 
- uc_authorizenet_payment_gateway in payment/uc_authorizenet/ uc_authorizenet.module 
- Implementation of hook_payment_gateway().
- uc_cybersource_payment_gateway in payment/uc_cybersource/ uc_cybersource.module 
- uc_paypal_payment_gateway in payment/uc_paypal/ uc_paypal.module 
- Implementation of hook_payment_gateway().
1 invocation of hook_payment_gateway()
- _payment_gateway_list in payment/uc_payment/ uc_payment.module 
- Build a list of payment gateways defined in the enabled modules.
File
- docs/hooks.php, line 755 
- These are the hooks that are invoked by the Übercart 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;
}