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\Zed\Easycredit; |
9
|
|
|
|
10
|
|
|
use Spryker\Zed\Kernel\AbstractBundleConfig; |
11
|
|
|
use SprykerEco\Shared\Easycredit\EasycreditConstants; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @method \SprykerEco\Shared\Easycredit\EasycreditConfig getSharedConfig() |
15
|
|
|
*/ |
16
|
|
|
class EasycreditConfig extends AbstractBundleConfig |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @return string |
20
|
|
|
*/ |
21
|
|
|
public function getSuccessUrl(): string |
22
|
|
|
{ |
23
|
|
|
return $this->get(EasycreditConstants::SUCCESS_URL); |
24
|
|
|
} |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @return string |
28
|
|
|
*/ |
29
|
|
|
public function getCancelledUrl(): string |
30
|
|
|
{ |
31
|
|
|
return $this->get(EasycreditConstants::CANCELLED_URL); |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @return string |
36
|
|
|
*/ |
37
|
|
|
public function getDeniedUrl(): string |
38
|
|
|
{ |
39
|
|
|
return $this->get(EasycreditConstants::DENIED_URL); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @return string |
44
|
|
|
*/ |
45
|
|
|
public function getShopIdentifier(): string |
46
|
|
|
{ |
47
|
|
|
return $this->get(EasycreditConstants::SHOP_IDENTIFIER); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @return string |
52
|
|
|
*/ |
53
|
|
|
public function getShopToken(): string |
54
|
|
|
{ |
55
|
|
|
return $this->get(EasycreditConstants::SHOP_TOKEN); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @return string |
60
|
|
|
*/ |
61
|
|
|
public function getPaymentPageIntegrationType(): string |
62
|
|
|
{ |
63
|
|
|
return $this->getSharedConfig()->getPaymentPageIntegrationType(); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return int |
68
|
|
|
*/ |
69
|
|
|
public function getPaymentMethodMinAvailableMoneyValue(): int |
70
|
|
|
{ |
71
|
|
|
return $this->getSharedConfig()->getPaymentMethodMinAvailableMoneyValue(); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @return int |
76
|
|
|
*/ |
77
|
|
|
public function getPaymentMethodMaxAvailableMoneyValue(): int |
78
|
|
|
{ |
79
|
|
|
return $this->getSharedConfig()->getPaymentMethodMaxAvailableMoneyValue(); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return array |
84
|
|
|
*/ |
85
|
|
|
public function getPaymentMethodAvailableCountries(): array |
86
|
|
|
{ |
87
|
|
|
return $this->getSharedConfig()->getPaymentMethodAvailableCountries(); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return string |
92
|
|
|
*/ |
93
|
|
|
public function getPaymentMethod(): string |
94
|
|
|
{ |
95
|
|
|
return $this->getSharedConfig()->getPaymentMethod(); |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return string |
100
|
|
|
*/ |
101
|
|
|
public function getApiUrl(): string |
102
|
|
|
{ |
103
|
|
|
return $this->get(EasycreditConstants::API_URL); |
104
|
|
|
} |
105
|
|
|
} |
106
|
|
|
|