function payment_rules_event_info in Payment 7
Implements hook_rules_event_info().
File
- ./
payment.rules.inc, line 11 - Rules integration.
Code
function payment_rules_event_info() {
$event['payment_status_change'] = array(
'label' => t("After changing a payment's status"),
'group' => t('Payment'),
'access callback' => 'payment_rules_access',
'variables' => array(
'payment' => array(
'type' => 'payment',
'label' => t('Payment'),
),
'payment_old_status' => array(
'type' => 'text',
'label' => t("The payment's old status"),
),
),
);
$event['payment_pre_execute'] = array(
'label' => t('Before executing a payment'),
'group' => t('Payment'),
'access callback' => 'payment_rules_access',
'variables' => array(
'payment' => array(
'type' => 'payment',
'label' => t('Payment'),
),
),
);
$event['payment_pre_finish'] = array(
'label' => t("When resuming the user's work after finishing payment execution"),
'group' => t('Payment'),
'access callback' => 'payment_rules_access',
'variables' => array(
'payment' => array(
'type' => 'payment',
'label' => t('Payment'),
),
),
);
$event['payment_validate'] = array(
'label' => t('When validating a payment against an arbitrary payment method'),
'group' => t('Payment'),
'access callback' => 'payment_rules_access',
'variables' => array(
'payment' => array(
'type' => 'payment',
'label' => t('Payment'),
),
'payment_method' => array(
'type' => 'payment_method',
'label' => t('Payment method'),
'description' => t('The payment method the variable is validated against.'),
),
'strict' => array(
'type' => 'boolean',
'label' => t('Strict validation'),
'description' => t('Whether to validate everything a payment method needs or to validate the most important things only. Useful when finding available payment methods, for instance, which does not require unimportant things to be a 100% valid.'),
),
),
);
return $event;
}