-
Notifications
You must be signed in to change notification settings - Fork 7
/
interface.php
67 lines (57 loc) · 1.68 KB
/
interface.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
<?php
interface WC_Gateway_Nimiq_Validation_Service_Interface {
/**
* Initializes the validation service
* @param {WC_Gateway_Nimiq} $gateway - A WC_Gateway_Nimiq class instance
* @return {void}
*/
public function __construct( $gateway );
/**
* Loads a transaction from the service
* @param {string} $transaction_hash - Transaction hash as HEX string
* @param {WP_Order} $order
* @param {WC_Gateway_Nimiq} $gateway
* @return {'NOT_FOUND'|'PAID'|'OVERPAID'|'UNDERPAID'|WP_Error}
*/
public function load_transaction( $transaction_hash, $order, $gateway );
/**
* Returns if transaction was found or not
* @return {boolean}
*/
public function transaction_found();
/**
* Returns any error that the service returned
* @return {string|false}
*/
public function error();
/**
* Returns the userfriendly address of the transaction sender
* @return {string}
*/
public function sender_address();
/**
* Returns the userfriendly address of the transaction recipient
* @return {string}
*/
public function recipient_address();
/**
* Returns the value of the transaction in the smallest unit
* @return {string}
*/
public function value();
/**
* Returns the data (message) of the transaction in plain text
* @return {string}
*/
public function message();
/**
* Returns the height of the block containing the transaction
* @return {number}
*/
public function block_height();
/**
* Returns the confirmations of the transaction
* @return {number}
*/
public function confirmations();
}