-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpgapi.api.php
68 lines (59 loc) · 1.2 KB
/
pgapi.api.php
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
<?php
/**
* @file
* Provides hook documentation for PGAPI module.
*/
/**
* Returns gateway info.
*
* @return array
* Keyed by module name.
*/
function hook_pgapi_gw_info() {
}
function hook_pgapi_callback($transaction) {
}
function hook_pgapi_format_price($type, $price, $symbol) {
}
function hook_pgapi_transaction($status, $transaction) {
}
function hook_pgapi_transaction_all($status, $transaction) {
}
/**
* Execute pgapi_payment_page.
*
* Hook used for execute own code on payment page.
*
* @param object $transaction
* Payment object.
*/
function hook_pgapi_payment_page($transaction) {
if (isset($_POST['status_failed'])) {
$transaction->status = PG_FAILED;
pgapi_transaction_save($transaction);
}
}
/**
* Executes pgapi hook.
*
* @param string $op
* The operation to be performed. Possible values:
* - "payment gateway info".
* - "display name".
* - "payment page".
* - "get form".
* - "process form".
* - "edit".
*
* @param number $a3
* Price.
*
* @param array $a4
* Form result.
*/
function hook_pgapi_gw($op, $a3 = NULL, $a4 = NULL) {
}
function hook_pgapi_transaction_status(&$status) {
}
function hook_pgapi_transaction_workflow(&$workflow) {
}