function commerce_cardonfile_entity_info in Commerce Card on File 7.2
Implements of hook_entity_info().
File
- ./
commerce_cardonfile.module, line 135 - Supports card on file functionality for credit card payment methods by associating card data reference IDs from payment gateways with user accounts.
Code
function commerce_cardonfile_entity_info() {
$data = array();
$data['commerce_cardonfile'] = array(
'label' => t('Commerce Card on File'),
'entity class' => 'CommerceCardOnFile',
'controller class' => 'EntityAPIController',
'base table' => 'commerce_cardonfile',
'fieldable' => TRUE,
'module' => 'commerce_cardonfile',
'entity keys' => array(
'id' => 'card_id',
),
'label callback' => 'entity_class_label',
'bundles' => array(
'commerce_cardonfile' => array(
'label' => t('Card on File'),
'admin' => array(
'path' => 'admin/commerce/config/cardonfile',
'access arguments' => array(
'configure cardonfile',
),
),
),
),
'load hook' => 'commerce_cardonfile_load',
'view modes' => array(
'administrator' => array(
'label' => t('Administrator'),
'custom settings' => FALSE,
),
'customer' => array(
'label' => t('Customer'),
'custom settings' => FALSE,
),
),
'access callback' => 'commerce_cardonfile_access',
'token type' => 'commerce-cardonfile',
'metadata controller class' => '',
'extra fields controller class' => 'CommerceCardOnFileExtraFieldsController',
);
return $data;
}