-
Notifications
You must be signed in to change notification settings - Fork 6
/
ding_dibs.install
54 lines (49 loc) · 1.36 KB
/
ding_dibs.install
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
51
52
53
54
<?php
/**
* Implements hook_install().
*/
function ding_dibs_install() {
// Inserting default order id setting.
db_insert('dibs_order_id_settings')
->fields(array(
'api_module' => 'ding_dibs',
'api_delta' => '1',
'order_id' => 10000,
'order_id_prefix' => '',
'order_id_suffix' => '',
))
->execute();
db_add_field('dibs_transactions', 'provider_payment_status', array(
'type' => 'int',
'length' => 1,
'size' => 'tiny',
'default' => 0,
'description' => '0 = payment not recieved, 1 = payment recieved',
));
db_add_field('dibs_transactions', 'dibs_capture_status', array(
'type' => 'int',
'length' => 1,
'size' => 'tiny',
'default' => 0,
'description' => '0 = capture failed, 1 = capture succeeded',
));
}
/**
* Add column for storing provider payment status and DIBS capture status.
*/
function ding_dibs_update_7000(&$sandbox) {
db_add_field('dibs_transactions', 'provider_payment_status', array(
'type' => 'int',
'length' => 1,
'size' => 'tiny',
'default' => 0,
'description' => t('0 = payment not recieved, 1 = payment recieved'),
));
db_add_field('dibs_transactions', 'dibs_capture_status', array(
'type' => 'int',
'length' => 1,
'size' => 'tiny',
'default' => 0,
'description' => t('0 = capture failed, 1 = capture succeeded'),
));
}