Passed
Push — feature/eco-3656/eco-3658-enab... ( 8eb6f7...b8ae93 )
by
unknown
05:52
created

ComputopConfig::getPayPalClientId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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
    /**
19
     * @var string
20
     */
21
    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.
22
    /**
23
     * @var string
24
     */
25
    public const RESPONSE_ENCRYPT_TYPE = 'encrypt';
26
27
    /**
28
     * @var string
29
     */
30
    protected const EASY_CREDIT_SUCCESS_ACTION = 'checkout-summary';
31
    /**
32
     * @var int
33
     */
34
    protected const PAYPAL_MAX_ORDER_DESCRIPTION_ITEMS = 98;
35
36
    /**
37
     * @api
38
     *
39
     * @return string
40
     */
41
    public function getEasyCreditSuccessAction(): string
42
    {
43
        return static::EASY_CREDIT_SUCCESS_ACTION;
44
    }
45
46
    /**
47
     * @api
48
     *
49
     * @return string
50
     */
51
    public function getCallbackSuccessOrderRedirectPath(): string
52
    {
53
        return 'checkout-summary';
54
    }
55
56
    /**
57
     * @api
58
     *
59
     * @return string
60
     */
61
    public function getCallbackSuccessCaptureRedirectPath(): string
62
    {
63
        return 'checkout-success';
64
    }
65
66
    /**
67
     * @api
68
     *
69
     * @return string
70
     */
71
    public function getCallbackFailureRedirectPath(): string
72
    {
73
        return 'checkout-payment';
74
    }
75
76
    /**
77
     * @api
78
     *
79
     * @return string[]
80
     */
81
    public function getPaymentMethodsWithoutOrderCall(): array
82
    {
83
        return $this->get(ComputopConstants::PAYMENT_METHODS_WITHOUT_ORDER_CALL);
84
    }
85
86
    /**
87
     * @api
88
     *
89
     * @return string
90
     */
91
    public function getBaseUrlSsl(): string
92
    {
93
        return $this->get(ApplicationConstants::BASE_URL_SSL_YVES);
0 ignored issues
show
Deprecated Code introduced by
The constant Spryker\Shared\Applicati...ants::BASE_URL_SSL_YVES has been deprecated: Use {@link \Spryker\Shared\Application\ApplicationConstants::BASE_URL_YVES} instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

93
        return $this->get(/** @scrutinizer ignore-deprecated */ ApplicationConstants::BASE_URL_SSL_YVES);

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.

Loading history...
94
    }
95
96
    /**
97
     * @api
98
     *
99
     * @return string
100
     */
101
    public function getMerchantId(): string
102
    {
103
        return $this->get(ComputopApiConstants::MERCHANT_ID);
104
    }
105
106
    /**
107
     * @api
108
     *
109
     * @return string
110
     */
111
    public function getPaydirektShopKey(): string
112
    {
113
        return $this->get(ComputopConstants::PAYDIREKT_SHOP_KEY);
114
    }
115
116
    /**
117
     * @api
118
     *
119
     * @return string
120
     */
121
    public function getBlowfishPassword(): string
122
    {
123
        return $this->get(ComputopApiConstants::BLOWFISH_PASSWORD);
124
    }
125
126
    /**
127
     * @api
128
     *
129
     * @return string
130
     */
131
    public function getPaypalInitActionUrl(): string
132
    {
133
        return $this->get(ComputopConstants::PAYPAL_INIT_ACTION);
134
    }
135
136
    /**
137
     * @api
138
     *
139
     * @return string
140
     */
141
    public function getDirectDebitInitActionUrl(): string
142
    {
143
        return $this->get(ComputopConstants::DIRECT_DEBIT_INIT_ACTION);
144
    }
145
146
    /**
147
     * @api
148
     *
149
     * @return string
150
     */
151
    public function getCreditCardInitActionUrl(): string
152
    {
153
        return $this->get(ComputopConstants::CREDIT_CARD_INIT_ACTION);
154
    }
155
156
    /**
157
     * @api
158
     *
159
     * @return string
160
     */
161
    public function getPayNowInitActionUrl(): string
162
    {
163
        return $this->get(ComputopConstants::PAY_NOW_INIT_ACTION);
164
    }
165
166
    /**
167
     * @api
168
     *
169
     * @return string
170
     */
171
    public function getEasyCreditInitActionUrl(): string
172
    {
173
        return $this->get(ComputopConstants::EASY_CREDIT_INIT_ACTION);
174
    }
175
176
    /**
177
     * @api
178
     *
179
     * @return bool
180
     */
181
    public function getCreditCardTemplateEnabled(): bool
182
    {
183
        return $this->get(ComputopConstants::CREDIT_CARD_TEMPLATE_ENABLED);
184
    }
185
186
    /**
187
     * @api
188
     *
189
     * @return string[]
190
     */
191
    public function getPaymentMethodsCaptureTypes(): array
192
    {
193
        return $this->get(ComputopApiConstants::PAYMENT_METHODS_CAPTURE_TYPES);
194
    }
195
196
    /**
197
     * @api
198
     *
199
     * @return string
200
     */
201
    public function getCreditCardTxType(): string
202
    {
203
        return $this->get(ComputopConstants::CREDIT_CARD_TX_TYPE);
204
    }
205
206
    /**
207
     * @api
208
     *
209
     * @return string
210
     */
211
    public function getPayNowTxType(): string
212
    {
213
        return $this->get(ComputopConstants::PAY_NOW_TX_TYPE);
214
    }
215
216
    /**
217
     * @api
218
     *
219
     * @return string
220
     */
221
    public function getPayPalTxType(): string
222
    {
223
        return $this->get(ComputopConstants::PAY_PAL_TX_TYPE);
224
    }
225
226
    /**
227
     * @api
228
     *
229
     * @return string
230
     */
231
    public function getEtiId(): string
232
    {
233
        return SharedComputopConfig::COMPUTOP_MODULE_VERSION;
234
    }
235
236
    /**
237
     * {@inheriDoc}
238
     *
239
     * @api
240
     *
241
     * @return int
242
     */
243
    public function getMaxOrderDescriptionItemsForPayPalPaymentPage(): int
244
    {
245
        return static::PAYPAL_MAX_ORDER_DESCRIPTION_ITEMS;
246
    }
247
248
    /**
249
     * {@inheriDoc}
250
     *
251
     * @api
252
     *
253
     * @return string
254
     */
255
    public function getPayPalMethod(): string
256
    {
257
        return $this->get(ComputopConstants::PAY_PAL_EXPRESS_PAYPAL_METHOD);
258
    }
259
}
260