function commerce_cardonfile_rules_event_info in Commerce Card on File 7.2
Implements hook_rules_event_info().
File
- ./
commerce_cardonfile.rules.inc, line 27 - Provides Rules integration
Code
function commerce_cardonfile_rules_event_info() {
$events = array();
$events['commerce_cardonfile_charge_failed'] = array(
'label' => t('After a failed attempt to charge an order'),
'group' => t('Commerce Card on File'),
'access callback' => 'commerce_order_rules_access',
'variables' => array(
'card_data' => array(
'type' => 'commerce_cardonfile',
'label' => t('Card'),
'optional' => TRUE,
),
'order' => array(
'type' => 'commerce_order',
'label' => t('Order'),
),
'charge' => array(
'type' => 'commerce_price',
'label' => t('Charge'),
'optional' => TRUE,
),
'response' => array(
'type' => 'commerce_cardonfile_charge_card_response',
'label' => t('charge Card Response'),
),
),
);
$events['commerce_cardonfile_charge_success'] = array(
'label' => t('After a successful charging of an order'),
'group' => t('Commerce Card on File'),
'access callback' => 'commerce_order_rules_access',
'variables' => array(
'card_data' => array(
'type' => 'commerce_cardonfile',
'label' => t('Card'),
),
'order' => array(
'type' => 'commerce_order',
'label' => t('Order'),
),
'charge' => array(
'type' => 'commerce_price',
'label' => t('Charge'),
),
'response' => array(
'type' => 'commerce_cardonfile_charge_card_response',
'label' => t('charge Card Response'),
),
),
);
return $events;
}