1 | <?php |
||
22 | class Config extends GatewayConfig implements \JsonSerializable { |
||
23 | /** |
||
24 | * Business Id. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | private $business_id; |
||
29 | |||
30 | /** |
||
31 | * User. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | private $username; |
||
36 | |||
37 | /** |
||
38 | * Password. |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | private $password; |
||
43 | |||
44 | /** |
||
45 | * Store ID. |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | private $store_id; |
||
50 | |||
51 | /** |
||
52 | * Purchase ID. |
||
53 | * |
||
54 | * @var string|null |
||
55 | */ |
||
56 | private $purchase_id; |
||
57 | |||
58 | /** |
||
59 | * Construct config object. |
||
60 | * |
||
61 | * @param string $mode Mode. |
||
62 | * @param string $business_id Business Id. |
||
63 | * @param string $username Username. |
||
64 | * @param string $password Password. |
||
65 | * @param string $store_id Store ID. |
||
66 | */ |
||
67 | 11 | public function __construct( $mode, $business_id, $username, $password, $store_id ) { |
|
74 | |||
75 | /** |
||
76 | * Get business ID. |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | 3 | public function get_business_id() { |
|
83 | |||
84 | /** |
||
85 | * Get username. |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | 6 | public function get_username() { |
|
92 | |||
93 | /** |
||
94 | * Get password. |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | 6 | public function get_password() { |
|
101 | |||
102 | /** |
||
103 | * Get store ID. |
||
104 | * |
||
105 | * @return string |
||
106 | */ |
||
107 | 3 | public function get_store_id() { |
|
110 | |||
111 | /** |
||
112 | * Get endpoint URL. |
||
113 | * |
||
114 | * @link https://developers.acehubpaymentservices.com/docs/service-endpoints-and-headers |
||
115 | * @param string $path Path. |
||
116 | * @return string |
||
117 | */ |
||
118 | 7 | public function get_endpoint_url( $path ) { |
|
125 | |||
126 | /** |
||
127 | * Get purchase ID. |
||
128 | * |
||
129 | * @return string|null |
||
130 | */ |
||
131 | 1 | public function get_purchase_id() { |
|
134 | |||
135 | /** |
||
136 | * Set purchase ID. |
||
137 | * |
||
138 | * @param string|null $purchase_id Purchase ID. |
||
139 | * @return void |
||
140 | */ |
||
141 | 1 | public function set_purchase_id( $purchase_id ) { |
|
144 | |||
145 | /** |
||
146 | * JSON serialize. |
||
147 | * |
||
148 | * @return object |
||
149 | */ |
||
150 | 2 | public function jsonSerialize() { |
|
160 | } |
||
161 |