Passed
Push — feature/eco-3653-handle-callba... ( a04ef8...b78799 )
by
unknown
05:21
created

ComputopConfig::getEasyCreditInitActionUrl()   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
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
     * Specification:
165
     * - Get PayU CEE Single init action URL
166
     *
167
     * @api
168
     *
169
     * @return string|null
170
     */
171
    public function getPayuCeeSingleInitActionUrl(): ?string
172
    {
173
        return $this->get(ComputopConstants::PAYU_CEE_SINGLE_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