Passed
Push — feature/eco-3656/eco-3658-fix-... ( b1d0d7...d62755 )
by Roman
05:56
created

getMaxOrderDescItemsForPayPalPaymentPage()   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
    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
23
    /**
24
     * @api
25
     *
26
     * @return string
27
     */
28
    public function getEasyCreditSuccessAction(): string
29
    {
30
        return static::EASY_CREDIT_SUCCESS_ACTION;
31
    }
32
33
    /**
34
     * @api
35
     *
36
     * @return string
37
     */
38
    public function getCallbackSuccessOrderRedirectPath(): string
39
    {
40
        return 'checkout-summary';
41
    }
42
43
    /**
44
     * @api
45
     *
46
     * @return string
47
     */
48
    public function getCallbackSuccessCaptureRedirectPath(): string
49
    {
50
        return 'checkout-success';
51
    }
52
53
    /**
54
     * @api
55
     *
56
     * @return string
57
     */
58
    public function getCallbackFailureRedirectPath(): string
59
    {
60
        return 'checkout-payment';
61
    }
62
63
    /**
64
     * @api
65
     *
66
     * @return string[]
67
     */
68
    public function getPaymentMethodsWithoutOrderCall(): array
69
    {
70
        return $this->get(ComputopConstants::PAYMENT_METHODS_WITHOUT_ORDER_CALL);
71
    }
72
73
    /**
74
     * @api
75
     *
76
     * @return string
77
     */
78
    public function getBaseUrlSsl(): string
79
    {
80
        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

80
        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...
81
    }
82
83
    /**
84
     * @api
85
     *
86
     * @return string
87
     */
88
    public function getMerchantId(): string
89
    {
90
        return $this->get(ComputopApiConstants::MERCHANT_ID);
91
    }
92
93
    /**
94
     * @api
95
     *
96
     * @return string
97
     */
98
    public function getPaydirektShopKey(): string
99
    {
100
        return $this->get(ComputopConstants::PAYDIREKT_SHOP_KEY);
101
    }
102
103
    /**
104
     * @api
105
     *
106
     * @return string
107
     */
108
    public function getBlowfishPassword(): string
109
    {
110
        return $this->get(ComputopApiConstants::BLOWFISH_PASSWORD);
111
    }
112
113
    /**
114
     * @api
115
     *
116
     * @return string
117
     */
118
    public function getPaypalInitActionUrl(): string
119
    {
120
        return $this->get(ComputopConstants::PAYPAL_INIT_ACTION);
121
    }
122
123
    /**
124
     * @api
125
     *
126
     * @return string
127
     */
128
    public function getDirectDebitInitActionUrl(): string
129
    {
130
        return $this->get(ComputopConstants::DIRECT_DEBIT_INIT_ACTION);
131
    }
132
133
    /**
134
     * @api
135
     *
136
     * @return string
137
     */
138
    public function getCreditCardInitActionUrl(): string
139
    {
140
        return $this->get(ComputopConstants::CREDIT_CARD_INIT_ACTION);
141
    }
142
143
    /**
144
     * @api
145
     *
146
     * @return string
147
     */
148
    public function getPayNowInitActionUrl(): string
149
    {
150
        return $this->get(ComputopConstants::PAY_NOW_INIT_ACTION);
151
    }
152
153
    /**
154
     * @api
155
     *
156
     * @return string
157
     */
158
    public function getEasyCreditInitActionUrl(): string
159
    {
160
        return $this->get(ComputopConstants::EASY_CREDIT_INIT_ACTION);
161
    }
162
163
    /**
164
     * @api
165
     *
166
     * @return bool
167
     */
168
    public function getCreditCardTemplateEnabled(): bool
169
    {
170
        return $this->get(ComputopConstants::CREDIT_CARD_TEMPLATE_ENABLED);
171
    }
172
173
    /**
174
     * @api
175
     *
176
     * @return string[]
177
     */
178
    public function getPaymentMethodsCaptureTypes(): array
179
    {
180
        return $this->get(ComputopApiConstants::PAYMENT_METHODS_CAPTURE_TYPES);
181
    }
182
183
    /**
184
     * @api
185
     *
186
     * @return string
187
     */
188
    public function getCreditCardTxType(): string
189
    {
190
        return $this->get(ComputopConstants::CREDIT_CARD_TX_TYPE);
191
    }
192
193
    /**
194
     * @api
195
     *
196
     * @return string
197
     */
198
    public function getPayNowTxType(): string
199
    {
200
        return $this->get(ComputopConstants::PAY_NOW_TX_TYPE);
201
    }
202
203
    /**
204
     * @api
205
     *
206
     * @return string
207
     */
208
    public function getPayPalTxType(): string
209
    {
210
        return $this->get(ComputopConstants::PAY_PAL_TX_TYPE);
211
    }
212
213
    /**
214
     * @api
215
     *
216
     * @return string
217
     */
218
    public function getEtiId(): string
219
    {
220
        return SharedComputopConfig::COMPUTOP_MODULE_VERSION;
221
    }
222
223
    /**
224
     * @inheriDoc
225
     *
226
     * @api
227
     *
228
     * @return int
229
     */
230
    public function getMaxOrderDescItemsForPayPalPaymentPage(): int
231
    {
232
        return 98;
233
    }
234
}
235