1
|
|
|
<?php |
2
|
|
|
declare(strict_types=1); |
3
|
|
|
|
4
|
|
|
namespace MerchantSafeUnipay\SDK\Action; |
5
|
|
|
|
6
|
|
|
use MerchantSafeUnipay; |
7
|
|
|
|
8
|
|
|
final class PaymentSystem extends ActionAbstract implements ActionInterface |
9
|
|
|
{ |
10
|
|
|
static private $addKeys = [ |
11
|
|
|
'PAYMENTSYSTEM', 'PAYMENTSYSTEMTYPE', 'STATUS', 'PAYMENTSYSTEMMODE', 'APIMERCHANTID', 'APIUSERNAME', |
12
|
|
|
'APIPASSWORD', 'GATE3DKEY', 'INTEGRATIONEXTRAFIELD00', 'INTEGRATIONEXTRAFIELD01', 'ISDEFAULT', |
13
|
|
|
'SUBMERCHANTCODE' |
14
|
|
|
]; |
15
|
|
|
static private $editKeys = [ |
16
|
|
|
'PAYMENTSYSTEMTYPE', 'PAYMENTSYSTEM', 'STATUS', 'PAYMENTSYSTEMMODE', 'APIMERCHANTID', 'APIUSERNAME', |
17
|
|
|
'APIPASSWORD', 'GATE3DKEY', 'INTEGRATIONEXTRAFIELD00', 'INTEGRATIONEXTRAFIELD01', 'ISDEFAULT', |
18
|
|
|
'SUBMERCHANTCODE' |
19
|
|
|
]; |
20
|
|
|
static private $readKeys = [ |
21
|
|
|
'PAYMENTSYSTEMTYPE', 'PAYMENTSYSTEM' |
22
|
|
|
]; |
23
|
|
|
static private $enableKeys = [ |
24
|
|
|
'PAYMENTSYSTEMTYPE', 'PAYMENTSYSTEM' |
25
|
|
|
]; |
26
|
|
|
static private $disableKeys = [ |
27
|
|
|
'PAYMENTSYSTEMTYPE', 'PAYMENTSYSTEM' |
28
|
|
|
]; |
29
|
|
|
|
30
|
|
|
public function add($args) |
31
|
|
|
{ |
32
|
|
|
$this->action = 'PAYMENTSYSTEMADD'; |
33
|
|
|
$args = MerchantSafeUnipay\filter(self::$addKeys, $args); |
34
|
|
|
$this->queryParameters = array_merge($this->merchantParams, $args); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
public function edit($args) |
38
|
|
|
{ |
39
|
|
|
$this->action = 'PAYMENTSYSTEMEDIT'; |
40
|
|
|
$args = MerchantSafeUnipay\filter(self::$editKeys, $args); |
41
|
|
|
$this->queryParameters = array_merge($this->merchantParams, $args); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function read($args) |
45
|
|
|
{ |
46
|
|
|
$this->action = 'PAYMENTSYSTEMREAD'; |
47
|
|
|
$args = MerchantSafeUnipay\filter(self::$readKeys, $args); |
48
|
|
|
$this->queryParameters = array_merge($this->merchantParams, $args); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
public function enable($args) |
52
|
|
|
{ |
53
|
|
|
$this->action = 'PAYMENTSYSTEMENABLE'; |
54
|
|
|
$args = MerchantSafeUnipay\filter(self::$enableKeys, $args); |
55
|
|
|
$this->queryParameters = array_merge($this->merchantParams, $args); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
public function disable($args) |
59
|
|
|
{ |
60
|
|
|
$this->action = 'PAYMENTSYSTEMDISABLE'; |
61
|
|
|
$args = MerchantSafeUnipay\filter(self::$disableKeys, $args); |
62
|
|
|
$this->queryParameters = array_merge($this->merchantParams, $args); |
63
|
|
|
} |
64
|
|
|
} |
65
|
|
|
|