-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayson_api.install
142 lines (137 loc) · 3.84 KB
/
payson_api.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
/**
* @file
* Installs the tables required by Commerce Payson.
*/
/**
* Implements hook_schema().
*/
/*function payson_api_schema() {
$schema = array();
$schema['payson_api_ipn'] = array(
'description' => 'Stores processed IPNs.',
'fields' => array(
'ipn_id' => array(
'description' => 'Serial numeric ID of the IPN in the local database.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'txn_id' => array(
'description' => 'The Payson transaction ID.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'txn_type' => array(
'description' => 'The Payson transaction type.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'receiver_email' => array(
'description' => 'The e-mail of the payment receiever.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'payer_email' => array(
'description' => 'The e-mail of the payer.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'order_id' => array(
'description' => 'The order ID the payment belongs to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'transaction_id' => array(
'description' => 'The payment transaction ID the payment belongs to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'mc_gross' => array(
'description' => 'The gross payment amount.',
'type' => 'numeric',
'size' => 'normal',
'precision' => 10,
'scale' => 2,
'not null' => TRUE,
'default' => 0,
),
'mc_currency' => array(
'description' => 'The currency code of the payment.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'mc_fee' => array(
'description' => 'The amount of fees collected by Payson for this payment.',
'type' => 'numeric',
'size' => 'normal',
'precision' => 10,
'scale' => 2,
'not null' => TRUE,
'default' => 0,
),
'payment_status' => array(
'description' => 'The status of the payment at Payson.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'payment_type' => array(
'description' => 'The type of the payment.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'created' => array(
'description' => 'The Unix timestamp when the IPN was received.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'changed' => array(
'description' => 'The Unix timestamp when the IPN was last updated.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'test_ipn' => array(
'description' => 'Boolean indicating whether or not this was a test IPN sent by the Sandbox.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array('ipn_id'),
'foreign keys' => array(
'order_id' => array(
'table' => 'commerce_order',
'columns'=> array('order_id' => 'order_id'),
),
'transaction_id' => array(
'table' => 'commerce_payment_transaction',
'columns'=> array('payment_id' => 'payment_id'),
),
),
'indexes' => array(
'txn_id' => array('txn_id'),
),
);
return $schema;
}*/