Completed
Push — dev ( d19368 )
by Aleksey
12s
created

ComputopConfig   A

Complexity

Total Complexity 20

Size/Duplication

Total Lines 165
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 20
eloc 24
dl 0
loc 165
rs 10
c 0
b 0
f 0

20 Methods

Rating   Name   Duplication   Size   Complexity  
A getBaseUrlSsl() 0 3 1
A getPayNowTxType() 0 3 1
A getEasyCreditInitActionUrl() 0 3 1
A getCreditCardInitActionUrl() 0 3 1
A getPaydirektShopKey() 0 3 1
A getMerchantId() 0 3 1
A getPayNowInitActionUrl() 0 3 1
A getEasyCreditSuccessAction() 0 3 1
A getCreditCardTemplateEnabled() 0 3 1
A getCallbackFailureRedirectPath() 0 3 1
A getPaymentMethodsWithoutOrderCall() 0 3 1
A getBlowfishPassword() 0 3 1
A getCallbackSuccessCaptureRedirectPath() 0 3 1
A getPaymentMethodsCaptureTypes() 0 3 1
A getPaypalInitActionUrl() 0 3 1
A getCreditCardTxType() 0 3 1
A getCallbackSuccessOrderRedirectPath() 0 3 1
A getDirectDebitInitActionUrl() 0 3 1
A getPayPalTxType() 0 3 1
A getEtiId() 0 3 1
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
     * @return string
25
     */
26
    public function getEasyCreditSuccessAction(): string
27
    {
28
        return static::EASY_CREDIT_SUCCESS_ACTION;
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getCallbackSuccessOrderRedirectPath(): string
35
    {
36
        return 'checkout-summary';
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getCallbackSuccessCaptureRedirectPath(): string
43
    {
44
        return 'checkout-success';
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getCallbackFailureRedirectPath(): string
51
    {
52
        return 'checkout-payment';
53
    }
54
55
    /**
56
     * @return string[]
57
     */
58
    public function getPaymentMethodsWithoutOrderCall(): array
59
    {
60
        return $this->get(ComputopConstants::PAYMENT_METHODS_WITHOUT_ORDER_CALL);
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function getBaseUrlSsl(): string
67
    {
68
        return $this->get(ApplicationConstants::BASE_URL_SSL_YVES);
69
    }
70
71
    /**
72
     * @return string
73
     */
74
    public function getMerchantId(): string
75
    {
76
        return $this->get(ComputopApiConstants::MERCHANT_ID);
77
    }
78
79
    /**
80
     * @return string
81
     */
82
    public function getPaydirektShopKey(): string
83
    {
84
        return $this->get(ComputopConstants::PAYDIREKT_SHOP_KEY);
85
    }
86
87
    /**
88
     * @return string
89
     */
90
    public function getBlowfishPassword(): string
91
    {
92
        return $this->get(ComputopApiConstants::BLOWFISH_PASSWORD);
93
    }
94
95
    /**
96
     * @return string
97
     */
98
    public function getPaypalInitActionUrl(): string
99
    {
100
        return $this->get(ComputopConstants::PAYPAL_INIT_ACTION);
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getDirectDebitInitActionUrl(): string
107
    {
108
        return $this->get(ComputopConstants::DIRECT_DEBIT_INIT_ACTION);
109
    }
110
111
    /**
112
     * @return string
113
     */
114
    public function getCreditCardInitActionUrl(): string
115
    {
116
        return $this->get(ComputopConstants::CREDIT_CARD_INIT_ACTION);
117
    }
118
119
    /**
120
     * @return string
121
     */
122
    public function getPayNowInitActionUrl(): string
123
    {
124
        return $this->get(ComputopConstants::PAY_NOW_INIT_ACTION);
125
    }
126
127
    /**
128
     * @return string
129
     */
130
    public function getEasyCreditInitActionUrl(): string
131
    {
132
        return $this->get(ComputopConstants::EASY_CREDIT_INIT_ACTION);
133
    }
134
135
    /**
136
     * @return bool
137
     */
138
    public function getCreditCardTemplateEnabled(): bool
139
    {
140
        return $this->get(ComputopConstants::CREDIT_CARD_TEMPLATE_ENABLED);
141
    }
142
143
    /**
144
     * @return string[]
145
     */
146
    public function getPaymentMethodsCaptureTypes(): array
147
    {
148
        return $this->get(ComputopApiConstants::PAYMENT_METHODS_CAPTURE_TYPES);
149
    }
150
151
    /**
152
     * @return string
153
     */
154
    public function getCreditCardTxType(): string
155
    {
156
        return $this->get(ComputopConstants::CREDIT_CARD_TX_TYPE);
157
    }
158
159
    /**
160
     * @return string
161
     */
162
    public function getPayNowTxType(): string
163
    {
164
        return $this->get(ComputopConstants::PAY_NOW_TX_TYPE);
165
    }
166
167
    /**
168
     * @return string
169
     */
170
    public function getPayPalTxType(): string
171
    {
172
        return $this->get(ComputopConstants::PAY_PAL_TX_TYPE);
173
    }
174
175
    /**
176
     * @return string
177
     */
178
    public function getEtiId(): string
179
    {
180
        return SharedComputopConfig::COMPUTOP_MODULE_VERSION;
181
    }
182
}
183