|
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\Episerver; |
|
9
|
|
|
|
|
10
|
|
|
use Spryker\Shared\Application\ApplicationConstants; |
|
11
|
|
|
use Spryker\Zed\Kernel\AbstractBundleConfig; |
|
12
|
|
|
use SprykerEco\Shared\Episerver\EpiserverConstants; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* @method \SprykerEco\Shared\Episerver\EpiserverConfig getSharedConfig() |
|
16
|
|
|
*/ |
|
17
|
|
|
class EpiserverConfig extends AbstractBundleConfig |
|
18
|
|
|
{ |
|
19
|
|
|
/** |
|
20
|
|
|
* @return string |
|
21
|
|
|
*/ |
|
22
|
|
|
public function getRequestBaseUrl() |
|
23
|
|
|
{ |
|
24
|
|
|
return rtrim($this->get(EpiserverConstants::REQUEST_BASE_URL), '/'); |
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* @return int |
|
29
|
|
|
*/ |
|
30
|
|
|
public function getRequestTimeout() |
|
31
|
|
|
{ |
|
32
|
|
|
return (int)$this->get(EpiserverConstants::REQUEST_TIMEOUT); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @return string |
|
37
|
|
|
*/ |
|
38
|
|
|
public function getOrderListAuthorizationCode(): string |
|
39
|
|
|
{ |
|
40
|
|
|
return $this->get(EpiserverConstants::ORDER_LIST_AUTHORIZATION_CODE); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @return string |
|
45
|
|
|
*/ |
|
46
|
|
|
public function getOrderNewMailingId(): string |
|
47
|
|
|
{ |
|
48
|
|
|
return $this->get(EpiserverConstants::ORDER_NEW_MAILING_ID); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @return string |
|
53
|
|
|
*/ |
|
54
|
|
|
public function getOrderPaymentIsNotReceivedMailingId(): string |
|
55
|
|
|
{ |
|
56
|
|
|
return $this->get(EpiserverConstants::ORDER_PAYMENT_IS_NOT_RECEIVED_MAILING_ID); |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @return string |
|
61
|
|
|
*/ |
|
62
|
|
|
public function getOrderShippingConfirmationMailingId(): string |
|
63
|
|
|
{ |
|
64
|
|
|
return $this->get(EpiserverConstants::ORDER_SHIPPING_CONFIRMATION_MAILING_ID); |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* @return string |
|
69
|
|
|
*/ |
|
70
|
|
|
public function getOrderCancelledMailingId(): string |
|
71
|
|
|
{ |
|
72
|
|
|
return $this->get(EpiserverConstants::ORDER_CANCELLED_MAILING_ID); |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* @return string |
|
77
|
|
|
*/ |
|
78
|
|
|
public function getServiceFormType(): string |
|
79
|
|
|
{ |
|
80
|
|
|
return $this->getSharedConfig()->getServiceFormType(); |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* @return string |
|
85
|
|
|
*/ |
|
86
|
|
|
public function getHostYves(): string |
|
87
|
|
|
{ |
|
88
|
|
|
return $this->get(ApplicationConstants::HOST_YVES); |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* @param string $mailingTypeName |
|
93
|
|
|
* |
|
94
|
|
|
* @return string|null |
|
95
|
|
|
*/ |
|
96
|
|
|
public function getMailingIdByMailingTypeName(string $mailingTypeName): ?string |
|
97
|
|
|
{ |
|
98
|
|
|
$mailingIdList = $this->get(EpiserverConstants::CONFIGURATION_DEFAULT_MAILING_ID_LIST); |
|
99
|
|
|
|
|
100
|
|
|
if (!empty($mailingIdList[$mailingTypeName])) { |
|
101
|
|
|
return $mailingIdList[$mailingTypeName]; |
|
102
|
|
|
} |
|
103
|
|
|
|
|
104
|
|
|
return null; |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* @return string |
|
109
|
|
|
*/ |
|
110
|
|
|
public function getOperationSendTransactionEmail(): string |
|
111
|
|
|
{ |
|
112
|
|
|
return $this->getSharedConfig()->getOperationSendTransactionEmail(); |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @return string |
|
117
|
|
|
*/ |
|
118
|
|
|
public function getCustomerListAuthorizationCode(): string |
|
119
|
|
|
{ |
|
120
|
|
|
return $this->get(EpiserverConstants::CUSTOMER_LIST_AUTHORIZATION_CODE); |
|
121
|
|
|
} |
|
122
|
|
|
|
|
123
|
|
|
/** |
|
124
|
|
|
* @return string |
|
125
|
|
|
*/ |
|
126
|
|
|
public function getCustomerNewsLetterListAuthorizationCode(): string |
|
127
|
|
|
{ |
|
128
|
|
|
return $this->get(EpiserverConstants::CUSTOMER_NEWSLETTER_AUTHORIZATION_CODE); |
|
129
|
|
|
} |
|
130
|
|
|
|
|
131
|
|
|
/** |
|
132
|
|
|
* @return string |
|
133
|
|
|
*/ |
|
134
|
|
|
public function getOperationSubscribeEventEmail(): string |
|
135
|
|
|
{ |
|
136
|
|
|
return $this->getSharedConfig()->getOperationSubscribeEventEmail(); |
|
137
|
|
|
} |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* @return string |
|
141
|
|
|
*/ |
|
142
|
|
|
public function getOperationUnsubscribeEventEmail(): string |
|
143
|
|
|
{ |
|
144
|
|
|
return $this->getSharedConfig()->getOperationUnsubscribeEventEmail(); |
|
145
|
|
|
} |
|
146
|
|
|
|
|
147
|
|
|
/** |
|
148
|
|
|
* @return string |
|
149
|
|
|
*/ |
|
150
|
|
|
public function getOperationUpdateFieldsEventEmail(): string |
|
151
|
|
|
{ |
|
152
|
|
|
return $this->getSharedConfig()->getOperationUpdateFieldsEventEmail(); |
|
153
|
|
|
} |
|
154
|
|
|
} |
|
155
|
|
|
|