hook_allocation_info

Definition

hook_allocation_info()
ecommerce-5--4/docs/developer/hooks/ec_receipt.php, line 200

Description

Register allocation types to the receipt system. An allocation is literally an allocation of some money on a receipt (say from a payment gateway) against a transaction.

Most transactions are generated by the store.module, hence the main implementer of allocations is store. Another example of a module that implements allocations is ec_receipt itself, which provides refunds (ie. an allocation amount debited from a transactio and credited to the customer).

Note: the above is sime's first attempt to describe it.

Return value

Return an array of info.

Related topics

Namesort iconDescription
HooksAllow modules to interact with the Drupal core.

Code

<?php
function hook_allocation_info() {
  // As per store.module
  return array(
    'transaction' => array(
      'name' => t('e-Commerce transactions'),
      'description' => t('Allocation interface for e-Commerce transactions.'),
      'module' => 'store',
    ),
  );
}
?>