Passed
Push — bugfix/supesc-227-extend-the-c... ( bf40aa...1b5338 )
by Oleh
04:23
created

getUseIndependentOrderIdForTransaction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Shared\CrefoPay;
9
10
use Spryker\Shared\Kernel\AbstractBundleConfig;
11
12
class CrefoPayConfig extends AbstractBundleConfig
13
{
14
    public const PROVIDER_NAME = 'crefoPay';
15
16
    public const CREFO_PAY_PAYMENT_METHOD_BILL = 'crefoPayBill';
17
    public const CREFO_PAY_PAYMENT_METHOD_CASH_ON_DELIVERY = 'crefoPayCashOnDelivery';
18
    public const CREFO_PAY_PAYMENT_METHOD_DIRECT_DEBIT = 'crefoPayDirectDebit';
19
    public const CREFO_PAY_PAYMENT_METHOD_PAY_PAL = 'crefoPayPayPal';
20
    public const CREFO_PAY_PAYMENT_METHOD_PREPAID = 'crefoPayPrepaid';
21
    public const CREFO_PAY_PAYMENT_METHOD_SOFORT = 'crefoPaySofort';
22
    public const CREFO_PAY_PAYMENT_METHOD_CREDIT_CARD = 'crefoPayCreditCard';
23
    public const CREFO_PAY_PAYMENT_METHOD_CREDIT_CARD_3D = 'crefoPayCreditCard3D';
24
25
    protected const USER_RISK_CLASS = 1; //Possible values: 0 -> trusted user, 1 -> default risk user, 2 -> high risk user.
26
    protected const PRODUCT_TYPE_DEFAULT = 'DEFAULT';
27
    protected const PRODUCT_TYPE_SHIPPING_COSTS = 'SHIPPINGCOSTS';
28
    protected const PRODUCT_TYPE_COUPON = 'COUPON';
29
30
    protected const PRODUCT_RISK_CLASS = 1;
31
    protected const EXTERNAL_PAYMENT_METHOD_BILL = 'BILL';
32
    protected const EXTERNAL_PAYMENT_METHOD_CASH_ON_DELIVERY = 'COD';
33
    protected const EXTERNAL_PAYMENT_METHOD_DIRECT_DEBIT = 'DD';
34
    protected const EXTERNAL_PAYMENT_METHOD_PAYPAL = 'PAYPAL';
35
    protected const EXTERNAL_PAYMENT_METHOD_PREPAID = 'PREPAID';
36
    protected const EXTERNAL_PAYMENT_METHOD_SOFORT = 'SU';
37
    protected const EXTERNAL_PAYMENT_METHOD_CREDIT_CARD = 'CC';
38
39
    protected const EXTERNAL_PAYMENT_METHOD_CREDIT_CARD_3D = 'CC3D';
40
41
    /**
42
     * @return string
43
     */
44
    public function getProviderName(): string
45
    {
46
        return static::PROVIDER_NAME;
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getUserRiskClass(): int
53
    {
54
        return static::USER_RISK_CLASS;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getProductTypeDefault(): string
61
    {
62
        return static::PRODUCT_TYPE_DEFAULT;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getProductTypeShippingCosts(): string
69
    {
70
        return static::PRODUCT_TYPE_SHIPPING_COSTS;
71
    }
72
73
    /**
74
     * @return int
75
     */
76
    public function getProductRiskClass(): int
77
    {
78
        return static::PRODUCT_RISK_CLASS;
79
    }
80
81
    /**
82
     * @return string
83
     */
84
    public function getExternalPaymentMethodBill(): string
85
    {
86
        return static::EXTERNAL_PAYMENT_METHOD_BILL;
87
    }
88
89
    /**
90
     * @return string
91
     */
92
    public function getExternalPaymentMethodCashOnDelivery(): string
93
    {
94
        return static::EXTERNAL_PAYMENT_METHOD_CASH_ON_DELIVERY;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getExternalPaymentMethodDirectDebit(): string
101
    {
102
        return static::EXTERNAL_PAYMENT_METHOD_DIRECT_DEBIT;
103
    }
104
105
    /**
106
     * @return string
107
     */
108
    public function getExternalPaymentMethodPayPal(): string
109
    {
110
        return static::EXTERNAL_PAYMENT_METHOD_PAYPAL;
111
    }
112
113
    /**
114
     * @return string
115
     */
116
    public function getExternalPaymentMethodPrepaid(): string
117
    {
118
        return static::EXTERNAL_PAYMENT_METHOD_PREPAID;
119
    }
120
121
    /**
122
     * @return string
123
     */
124
    public function getExternalPaymentMethodSofort(): string
125
    {
126
        return static::EXTERNAL_PAYMENT_METHOD_SOFORT;
127
    }
128
129
    /**
130
     * @return string
131
     */
132
    public function getExternalPaymentMethodCreditCard(): string
133
    {
134
        return static::EXTERNAL_PAYMENT_METHOD_CREDIT_CARD;
135
    }
136
137
    /**
138
     * @return string
139
     */
140
    public function getExternalPaymentMethodCreditCard3D(): string
141
    {
142
        return static::EXTERNAL_PAYMENT_METHOD_CREDIT_CARD_3D;
143
    }
144
145
    /**
146
     * @return string
147
     */
148
    public function getCrefoPayPaymentMethodBill(): string
149
    {
150
        return static::CREFO_PAY_PAYMENT_METHOD_BILL;
151
    }
152
153
    /**
154
     * @return string
155
     */
156
    public function getCrefoPayPaymentMethodCashOnDelivery(): string
157
    {
158
        return static::CREFO_PAY_PAYMENT_METHOD_CASH_ON_DELIVERY;
159
    }
160
161
    /**
162
     * @return string
163
     */
164
    public function getCrefoPayPaymentMethodDirectDebit(): string
165
    {
166
        return static::CREFO_PAY_PAYMENT_METHOD_DIRECT_DEBIT;
167
    }
168
169
    /**
170
     * @return string
171
     */
172
    public function getCrefoPayPaymentMethodPayPal(): string
173
    {
174
        return static::CREFO_PAY_PAYMENT_METHOD_PAY_PAL;
175
    }
176
177
    /**
178
     * @return string
179
     */
180
    public function getCrefoPayPaymentMethodPrepaid(): string
181
    {
182
        return static::CREFO_PAY_PAYMENT_METHOD_PREPAID;
183
    }
184
185
    /**
186
     * @return string
187
     */
188
    public function getCrefoPayPaymentMethodSofort(): string
189
    {
190
        return static::CREFO_PAY_PAYMENT_METHOD_SOFORT;
191
    }
192
193
    /**
194
     * @return string
195
     */
196
    public function getCrefoPayPaymentMethodCreditCard(): string
197
    {
198
        return static::CREFO_PAY_PAYMENT_METHOD_CREDIT_CARD;
199
    }
200
201
    /**
202
     * @return string
203
     */
204
    public function getCrefoPayPaymentMethodCreditCard3D(): string
205
    {
206
        return static::CREFO_PAY_PAYMENT_METHOD_CREDIT_CARD_3D;
207
    }
208
209
    /**
210
     * @return bool
211
     */
212
    public function getUseIndependentOrderIdForTransaction(): bool
213
    {
214
        return $this->get(CrefoPayConstants::USE_INDEPENDENT_ORDER_ID_FOR_TRANSACTION, false);
215
    }
216
}
217