You are here

function commerce_payleap_rules_action_info in Commerce Payleap 7

Implements hook_rules_action_info().

File

./commerce_payleap.rules.inc, line 5

Code

function commerce_payleap_rules_action_info() {
  $items = array();
  $items['commerce_payleap_capture_pending'] = array(
    'label' => t('Force capture on authorisation transactions.'),
    'group' => t('Commerce PayLeap'),
    'parameter' => array(
      'order' => array(
        'type' => 'commerce_order',
        'label' => t('Order'),
        'description' => t('The order to process, all pending transaction will be processed.'),
      ),
      'transaction' => array(
        'type' => 'commerce_transaction',
        'label' => t('Transaction'),
        'description' => t('The pending transaction, specify a single transaction to process.'),
        'optional' => TRUE,
      ),
    ),
    'base' => 'commerce_payleap_rules_capture_pending',
    'access callback' => 'commerce_payleap_rules_integration_access',
  );
  $items['commerce_payleap_cancel_transaction'] = array(
    'label' => t('Cancel/Refund transaction'),
    'group' => t('Commerce PayLeap'),
    'parameter' => array(
      'order' => array(
        'type' => 'commerce_order',
        'label' => t('Order'),
        'description' => t('The original order to cancel transactions for.'),
      ),
      'transaction' => array(
        'type' => 'commerce_transaction',
        'label' => t('Transaction'),
        'description' => t('The transaction to cancel, if this field is set only this transaction will be  canceled'),
        'optional' => TRUE,
      ),
    ),
    'base' => 'commerce_payleap_rules_cancel_capture',
    'access callback' => 'commerce_payleap_rules_integration_access',
  );
  return $items;
}