-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCfg.php
More file actions
157 lines (139 loc) · 3.9 KB
/
Cfg.php
File metadata and controls
157 lines (139 loc) · 3.9 KB
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
namespace Dfe\Alignet;
use Df\Core\O;
/** @used-by dfe_alignet_cfg() */
final class Cfg {
/**
* 2025-10-22
* @used-by self::urlStart()
* @used-by vendor/mage2pro/alignet/view/frontend/templates/classic/form.phtml
*/
function url(string $p):string {return df_cc_path($this->urlBase(), 'VPOS2', $p);}
/**
* 2025-10-22
* @used-by vendor/mage2pro/alignet/view/frontend/templates/classic/form.phtml
*/
function urlStart():string {return $this->url('faces/pages/startPayme.xhtml');}
/**
* 2025-10-22
* @used-by \Dfe\Alignet\Model\Client\Classic\Order\DataGetter::userCodePayme()
*/
function urlWalletWSDL():string {return df_cc_path(
$this->isProduction() ? 'https://www.pay-me.pe' : $this->urlBase()
,'WALLETWS/services/WalletCommerce?wsdl'
);}
/**
* 2025-10-22
* @used-by self::urlBase()
* @used-by self::urlWalletWSDL()
*/
private function isProduction():bool {return dfc($this, function():bool {return !!df_cfg(
'payment/payme_gateway/main_parameters/payme_environment'
);});}
/**
* 2025-10-22
* @used-by self::urlWalletWSDL()
* @used-by self::url()
*/
private function urlBase():string {return $this->isProduction()
? 'https://vpayment.verifika.com' : 'https://integracion.alignetsac.com'
;}
/**
* @used-by \Dfe\Alignet\Model\Client\Classic\Order\DataGetter::getBasicData()
* @used-by \Dfe\Alignet\Model\Client\Classic\Order\DataGetter::getSigForOrderRetrieve()
* @param string|null $key
* @return string|array
*/
function getConfig($key = null) {
$config = [
'test' => null,
'idEntCommerce' => $this->payme_wallet_id,
'keywallet' => $this->payme_wallet_secret,
'acquirerId' => $this->payme_adquir_id,
'idCommerce' => $this->payme_comerce_id,
'key' => $this->payme_vpos_id,
'idEntCommerce_usd' => $this->payme_wallet_id_dls,
'keywallet_usd' => $this->payme_wallet_secret_dls,
'acquirerId_usd' => $this->payme_adquir_id_dls,
'idCommerce_usd' => $this->payme_comerce_id_dls,
'key_usd' => $this->payme_vpos_id_dls
];
if ($key) {
return $config[$key];
}
return $config;
}
/**
* @used-by self::s()
*/
private function __construct() {
$this->payme_adquir_id = df_cfg('payment/payme_gateway/pos_parameters_soles/payme_adquir_id');
$this->payme_comerce_id = df_cfg('payment/payme_gateway/pos_parameters_soles/payme_comerce_id');
$this->payme_vpos_id = df_cfg('payment/payme_gateway/pos_parameters_soles/payme_vpos_id');
$this->payme_wallet_id = df_cfg('payment/payme_gateway/pos_parameters_soles/payme_wallet_id');
$this->payme_wallet_secret = df_cfg('payment/payme_gateway/pos_parameters_soles/payme_wallet_secret');
$this->payme_adquir_id_dls = df_cfg(
'payment/payme_gateway/pos_parameters_dolares/payme_adquir_id_dls'
);
$this->payme_comerce_id_dls = df_cfg(
'payment/payme_gateway/pos_parameters_dolares/payme_comerce_id_dls'
);
$this->payme_vpos_id_dls = df_cfg('payment/payme_gateway/pos_parameters_dolares/payme_vpos_id_dls');
$this->payme_wallet_id_dls = df_cfg(
'payment/payme_gateway/pos_parameters_dolares/payme_wallet_id_dls'
);
$this->payme_wallet_secret_dls = df_cfg(
'payment/payme_gateway/pos_parameters_dolares/payme_wallet_secret_dls'
);
}
/**
* 2025-10-22
* @var O
*/
private $_d;
/**
* @var string
*/
private $payme_adquir_id;
/**
* @var string
*/
private $payme_comerce_id;
/**
* @var string
*/
private $payme_vpos_id;
/**
* @var string
*/
private $payme_wallet_id;
/**
* @var string
*/
private $payme_wallet_secret;
/**
* @var string
*/
private $payme_adquir_id_dls;
/**
* @var string
*/
private $payme_comerce_id_dls;
/**
* @var string
*/
private $payme_vpos_id_dls;
/**
* @var string
*/
private $payme_wallet_id_dls;
/**
* @var string
*/
private $payme_wallet_secret_dls;
/**
* 2025-10-22
* @used-by dfe_alignet_cfg()
*/
static function s():self {static $r; return $r ? $r : $r = new self;}
}