1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Yves\Computop; |
9
|
|
|
|
10
|
|
|
use Spryker\Shared\Application\ApplicationConstants; |
11
|
|
|
use Spryker\Yves\Kernel\AbstractBundleConfig; |
12
|
|
|
use SprykerEco\Shared\Computop\ComputopConfig as SharedComputopConfig; |
13
|
|
|
use SprykerEco\Shared\Computop\ComputopConstants; |
14
|
|
|
use SprykerEco\Shared\ComputopApi\ComputopApiConstants; |
15
|
|
|
|
16
|
|
|
class ComputopConfig extends AbstractBundleConfig implements ComputopConfigInterface |
17
|
|
|
{ |
18
|
|
|
public const FINISH_AUTH = 'Y'; //Only with ETM: Transmit value <Y> in order to stop the renewal of guaranteed authorizations and rest amounts after partial captures. |
19
|
|
|
public const RESPONSE_ENCRYPT_TYPE = 'encrypt'; |
20
|
|
|
|
21
|
|
|
protected const EASY_CREDIT_SUCCESS_ACTION = 'checkout-summary'; |
22
|
|
|
protected const PAYPAL_MAX_ORDER_DESCRIPTION_ITEMS = 98; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @api |
26
|
|
|
* |
27
|
|
|
* @return string |
28
|
|
|
*/ |
29
|
|
|
public function getEasyCreditSuccessAction(): string |
30
|
|
|
{ |
31
|
|
|
return static::EASY_CREDIT_SUCCESS_ACTION; |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @api |
36
|
|
|
* |
37
|
|
|
* @return string |
38
|
|
|
*/ |
39
|
|
|
public function getCallbackSuccessOrderRedirectPath(): string |
40
|
|
|
{ |
41
|
|
|
return 'checkout-summary'; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @api |
46
|
|
|
* |
47
|
|
|
* @return string |
48
|
|
|
*/ |
49
|
|
|
public function getCallbackSuccessCaptureRedirectPath(): string |
50
|
|
|
{ |
51
|
|
|
return 'checkout-success'; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @api |
56
|
|
|
* |
57
|
|
|
* @return string |
58
|
|
|
*/ |
59
|
|
|
public function getCallbackFailureRedirectPath(): string |
60
|
|
|
{ |
61
|
|
|
return 'checkout-payment'; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @api |
66
|
|
|
* |
67
|
|
|
* @return string[] |
68
|
|
|
*/ |
69
|
|
|
public function getPaymentMethodsWithoutOrderCall(): array |
70
|
|
|
{ |
71
|
|
|
return $this->get(ComputopConstants::PAYMENT_METHODS_WITHOUT_ORDER_CALL); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @api |
76
|
|
|
* |
77
|
|
|
* @return string |
78
|
|
|
*/ |
79
|
|
|
public function getBaseUrlSsl(): string |
80
|
|
|
{ |
81
|
|
|
return $this->get(ApplicationConstants::BASE_URL_SSL_YVES); |
|
|
|
|
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @api |
86
|
|
|
* |
87
|
|
|
* @return string |
88
|
|
|
*/ |
89
|
|
|
public function getMerchantId(): string |
90
|
|
|
{ |
91
|
|
|
return $this->get(ComputopApiConstants::MERCHANT_ID); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @api |
96
|
|
|
* |
97
|
|
|
* @return string |
98
|
|
|
*/ |
99
|
|
|
public function getPaydirektShopKey(): string |
100
|
|
|
{ |
101
|
|
|
return $this->get(ComputopConstants::PAYDIREKT_SHOP_KEY); |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @api |
106
|
|
|
* |
107
|
|
|
* @return string |
108
|
|
|
*/ |
109
|
|
|
public function getBlowfishPassword(): string |
110
|
|
|
{ |
111
|
|
|
return $this->get(ComputopApiConstants::BLOWFISH_PASSWORD); |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @api |
116
|
|
|
* |
117
|
|
|
* @return string |
118
|
|
|
*/ |
119
|
|
|
public function getPaypalInitActionUrl(): string |
120
|
|
|
{ |
121
|
|
|
return $this->get(ComputopConstants::PAYPAL_INIT_ACTION); |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @api |
126
|
|
|
* |
127
|
|
|
* @return string |
128
|
|
|
*/ |
129
|
|
|
public function getDirectDebitInitActionUrl(): string |
130
|
|
|
{ |
131
|
|
|
return $this->get(ComputopConstants::DIRECT_DEBIT_INIT_ACTION); |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @api |
136
|
|
|
* |
137
|
|
|
* @return string |
138
|
|
|
*/ |
139
|
|
|
public function getCreditCardInitActionUrl(): string |
140
|
|
|
{ |
141
|
|
|
return $this->get(ComputopConstants::CREDIT_CARD_INIT_ACTION); |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* @api |
146
|
|
|
* |
147
|
|
|
* @return string |
148
|
|
|
*/ |
149
|
|
|
public function getPayNowInitActionUrl(): string |
150
|
|
|
{ |
151
|
|
|
return $this->get(ComputopConstants::PAY_NOW_INIT_ACTION); |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @api |
156
|
|
|
* |
157
|
|
|
* @return string |
158
|
|
|
*/ |
159
|
|
|
public function getEasyCreditInitActionUrl(): string |
160
|
|
|
{ |
161
|
|
|
return $this->get(ComputopConstants::EASY_CREDIT_INIT_ACTION); |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* @api |
166
|
|
|
* |
167
|
|
|
* @return bool |
168
|
|
|
*/ |
169
|
|
|
public function getCreditCardTemplateEnabled(): bool |
170
|
|
|
{ |
171
|
|
|
return $this->get(ComputopConstants::CREDIT_CARD_TEMPLATE_ENABLED); |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* @api |
176
|
|
|
* |
177
|
|
|
* @return string[] |
178
|
|
|
*/ |
179
|
|
|
public function getPaymentMethodsCaptureTypes(): array |
180
|
|
|
{ |
181
|
|
|
return $this->get(ComputopApiConstants::PAYMENT_METHODS_CAPTURE_TYPES); |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* @api |
186
|
|
|
* |
187
|
|
|
* @return string |
188
|
|
|
*/ |
189
|
|
|
public function getCreditCardTxType(): string |
190
|
|
|
{ |
191
|
|
|
return $this->get(ComputopConstants::CREDIT_CARD_TX_TYPE); |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @api |
196
|
|
|
* |
197
|
|
|
* @return string |
198
|
|
|
*/ |
199
|
|
|
public function getPayNowTxType(): string |
200
|
|
|
{ |
201
|
|
|
return $this->get(ComputopConstants::PAY_NOW_TX_TYPE); |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @api |
206
|
|
|
* |
207
|
|
|
* @return string |
208
|
|
|
*/ |
209
|
|
|
public function getPayPalTxType(): string |
210
|
|
|
{ |
211
|
|
|
return $this->get(ComputopConstants::PAY_PAL_TX_TYPE); |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* @api |
216
|
|
|
* |
217
|
|
|
* @return string |
218
|
|
|
*/ |
219
|
|
|
public function getEtiId(): string |
220
|
|
|
{ |
221
|
|
|
return SharedComputopConfig::COMPUTOP_MODULE_VERSION; |
222
|
|
|
} |
223
|
|
|
|
224
|
|
|
/** |
225
|
|
|
* {@inheriDoc} |
226
|
|
|
* |
227
|
|
|
* @api |
228
|
|
|
* |
229
|
|
|
* @return int |
230
|
|
|
*/ |
231
|
|
|
public function getMaxOrderDescriptionItemsForPayPalPaymentPage(): int |
232
|
|
|
{ |
233
|
|
|
return static::PAYPAL_MAX_ORDER_DESCRIPTION_ITEMS; |
234
|
|
|
} |
235
|
|
|
|
236
|
|
|
/** |
237
|
|
|
* {@inheriDoc} |
238
|
|
|
* |
239
|
|
|
* @api |
240
|
|
|
* |
241
|
|
|
* @return string |
242
|
|
|
*/ |
243
|
|
|
public function getPayPalMethod(): string |
244
|
|
|
{ |
245
|
|
|
return $this->get(ComputopConstants::PAY_PAL_EXPRESS_PAYPAL_METHOD); |
246
|
|
|
} |
247
|
|
|
|
248
|
|
|
/** |
249
|
|
|
* {@inheriDoc} |
250
|
|
|
* |
251
|
|
|
* @api |
252
|
|
|
* |
253
|
|
|
* @return string |
254
|
|
|
*/ |
255
|
|
|
public function getPayPalClientId(): string |
256
|
|
|
{ |
257
|
|
|
return $this->get(ComputopConstants::PAY_PAL_CLIENT_ID); |
258
|
|
|
} |
259
|
|
|
} |
260
|
|
|
|
This class constant has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the constant will be removed from the class and what other constant to use instead.