forked from dwkitchen/drupal-commerce_funds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommerce_store_funds.rules.inc
50 lines (46 loc) · 1.1 KB
/
commerce_store_funds.rules.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* @file
* commerce_funds.rules.inc
*/
/**
* Implements hook_rules_action_info().
*/
function commerce_store_funds_rules_action_info() {
$actions = array();
$actions['commerce_store_funds_credit'] = array(
'label' => t('Credit store account balance'),
'parameter' => array(
'store' => array(
'type' => 'commerce_store',
'label' => t('Store'),
),
'amount' => array(
'type' => 'commerce_price',
'label' => t('Amount'),
),
),
'group' => t('Commerce Store Funds'),
'callbacks' => array(
'execute' => 'commerce_store_funds_credit',
),
);
$actions['commerce_store_funds_debit'] = array(
'label' => t('Debit store account balance'),
'parameter' => array(
'store' => array(
'type' => 'commerce_store',
'label' => t('Store'),
),
'amount' => array(
'type' => 'commerce_price',
'label' => t('Amount'),
),
),
'group' => t('Commerce Store Funds'),
'callbacks' => array(
'execute' => 'commerce_store_funds_debit',
),
);
return $actions;
}