|
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\Payone; |
|
9
|
|
|
|
|
10
|
|
|
use Spryker\Yves\Kernel\AbstractFactory; |
|
11
|
|
|
use Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface; |
|
12
|
|
|
use Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface; |
|
13
|
|
|
use Spryker\Yves\StepEngine\Dependency\Plugin\Form\SubFormPluginInterface; |
|
14
|
|
|
use SprykerEco\Client\Payone\PayoneClientInterface; |
|
15
|
|
|
use SprykerEco\Yves\Payone\Dependency\Client\PayoneToCalculationInterface; |
|
16
|
|
|
use SprykerEco\Yves\Payone\Dependency\Client\PayoneToCartInterface; |
|
17
|
|
|
use SprykerEco\Yves\Payone\Dependency\Client\PayoneToCustomerInterface; |
|
18
|
|
|
use SprykerEco\Yves\Payone\Dependency\Client\PayoneToQuoteClientInterface; |
|
19
|
|
|
use SprykerEco\Yves\Payone\Dependency\Client\PayoneToShipmentInterface; |
|
20
|
|
|
use SprykerEco\Yves\Payone\Dependency\Client\PayoneToStoreClientInterface; |
|
21
|
|
|
use SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm; |
|
22
|
|
|
use SprykerEco\Yves\Payone\Form\BancontactOnlineTransferSubForm; |
|
23
|
|
|
use SprykerEco\Yves\Payone\Form\CashOnDeliverySubForm; |
|
24
|
|
|
use SprykerEco\Yves\Payone\Form\CreditCardSubForm; |
|
25
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\BancontactOnlineTransferDataProvider; |
|
26
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\CashOnDeliveryDataProvider; |
|
27
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\CreditCardDataProvider; |
|
28
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\DirectDebitDataProvider; |
|
29
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\EpsOnlineTransferDataProvider; |
|
30
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\EWalletDataProvider; |
|
31
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\GiropayOnlineTransferDataProvider; |
|
32
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\IdealOnlineTransferDataProvider; |
|
33
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\InstantOnlineTransferDataProvider; |
|
34
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\InvoiceDataProvider; |
|
35
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\KlarnaDataProvider; |
|
36
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\PostfinanceCardOnlineTransferDataProvider; |
|
37
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\PostfinanceEfinanceOnlineTransferDataProvider; |
|
38
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\PrePaymentDataProvider; |
|
39
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\Przelewy24OnlineTransferDataProvider; |
|
40
|
|
|
use SprykerEco\Yves\Payone\Form\DataProvider\SecurityInvoiceDataProvider; |
|
41
|
|
|
use SprykerEco\Yves\Payone\Form\DirectDebitSubForm; |
|
42
|
|
|
use SprykerEco\Yves\Payone\Form\EpsOnlineTransferSubForm; |
|
43
|
|
|
use SprykerEco\Yves\Payone\Form\EWalletSubForm; |
|
44
|
|
|
use SprykerEco\Yves\Payone\Form\GiropayOnlineTransferSubForm; |
|
45
|
|
|
use SprykerEco\Yves\Payone\Form\IdealOnlineTransferSubForm; |
|
46
|
|
|
use SprykerEco\Yves\Payone\Form\InstantOnlineTransferSubForm; |
|
47
|
|
|
use SprykerEco\Yves\Payone\Form\InvoiceSubForm; |
|
48
|
|
|
use SprykerEco\Yves\Payone\Form\KlarnaSubForm; |
|
49
|
|
|
use SprykerEco\Yves\Payone\Form\PostfinanceCardOnlineTransferSubForm; |
|
50
|
|
|
use SprykerEco\Yves\Payone\Form\PostfinanceEfinanceOnlineTransferSubForm; |
|
51
|
|
|
use SprykerEco\Yves\Payone\Form\PrePaymentForm; |
|
52
|
|
|
use SprykerEco\Yves\Payone\Form\Przelewy24OnlineTransferSubForm; |
|
53
|
|
|
use SprykerEco\Yves\Payone\Form\SecurityInvoiceSubForm; |
|
54
|
|
|
use SprykerEco\Yves\Payone\Handler\ExpressCheckout\QuoteHydrator; |
|
55
|
|
|
use SprykerEco\Yves\Payone\Handler\ExpressCheckout\QuoteHydratorInterface; |
|
56
|
|
|
use SprykerEco\Yves\Payone\Handler\ExpressCheckoutHandler; |
|
57
|
|
|
use SprykerEco\Yves\Payone\Handler\ExpressCheckoutHandlerInterface; |
|
58
|
|
|
use SprykerEco\Yves\Payone\Handler\PayoneHandler; |
|
59
|
|
|
use SprykerEco\Yves\Payone\Handler\PayoneHandlerInterface; |
|
60
|
|
|
use SprykerEco\Yves\Payone\Model\StoreReader; |
|
61
|
|
|
use SprykerEco\Yves\Payone\Model\StoreReaderInterface; |
|
62
|
|
|
use SprykerEco\Yves\Payone\Plugin\PayoneCreditCardSubFormPlugin; |
|
63
|
|
|
use SprykerEco\Yves\Payone\Plugin\PayonePrePaymentSubFormPlugin; |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* @method \SprykerEco\Yves\Payone\PayoneConfig getConfig() |
|
67
|
|
|
*/ |
|
68
|
|
|
class PayoneFactory extends AbstractFactory |
|
69
|
|
|
{ |
|
70
|
|
|
/** |
|
71
|
|
|
* @var \SprykerEco\Yves\Payone\Model\StoreReaderInterface|null |
|
72
|
|
|
*/ |
|
73
|
|
|
protected ?StoreReaderInterface $storeReader = null; |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
77
|
|
|
*/ |
|
78
|
|
|
public function createPrePaymentForm(): AbstractPayoneSubForm |
|
79
|
|
|
{ |
|
80
|
|
|
return new PrePaymentForm(); |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
85
|
|
|
*/ |
|
86
|
|
|
public function createPrePaymentFormDataProvider(): StepEngineFormDataProviderInterface |
|
87
|
|
|
{ |
|
88
|
|
|
return new PrePaymentDataProvider(); |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
93
|
|
|
*/ |
|
94
|
|
|
public function createInvoiceSubForm(): AbstractPayoneSubForm |
|
95
|
|
|
{ |
|
96
|
|
|
return new InvoiceSubForm(); |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
|
101
|
|
|
*/ |
|
102
|
|
|
public function createSecurityInvoiceSubForm(): SubFormInterface |
|
103
|
|
|
{ |
|
104
|
|
|
return new SecurityInvoiceSubForm(); |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
109
|
|
|
*/ |
|
110
|
|
|
public function createKlarnaSubForm(): AbstractPayoneSubForm |
|
111
|
|
|
{ |
|
112
|
|
|
return new KlarnaSubForm(); |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
117
|
|
|
*/ |
|
118
|
|
|
public function createInvoiceSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
119
|
|
|
{ |
|
120
|
|
|
return new InvoiceDataProvider(); |
|
121
|
|
|
} |
|
122
|
|
|
|
|
123
|
|
|
/** |
|
124
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
|
125
|
|
|
*/ |
|
126
|
|
|
public function createCashOnDeliverySubForm(): SubFormInterface |
|
127
|
|
|
{ |
|
128
|
|
|
return new CashOnDeliverySubForm(); |
|
129
|
|
|
} |
|
130
|
|
|
|
|
131
|
|
|
/** |
|
132
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
133
|
|
|
*/ |
|
134
|
|
|
public function createCashOnDeliverySubFormDataProvider(): StepEngineFormDataProviderInterface |
|
135
|
|
|
{ |
|
136
|
|
|
return new CashOnDeliveryDataProvider(); |
|
137
|
|
|
} |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
141
|
|
|
*/ |
|
142
|
|
|
public function createSecurityInvoiceSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
143
|
|
|
{ |
|
144
|
|
|
return new SecurityInvoiceDataProvider(); |
|
145
|
|
|
} |
|
146
|
|
|
|
|
147
|
|
|
/** |
|
148
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
149
|
|
|
*/ |
|
150
|
|
|
public function createKlarnaDataProvider(): StepEngineFormDataProviderInterface |
|
151
|
|
|
{ |
|
152
|
|
|
return new KlarnaDataProvider($this->getClientStore()); |
|
153
|
|
|
} |
|
154
|
|
|
|
|
155
|
|
|
/** |
|
156
|
|
|
* @return \SprykerEco\Yves\Payone\Handler\PayoneHandlerInterface |
|
157
|
|
|
*/ |
|
158
|
|
|
public function createPayoneHandler(): PayoneHandlerInterface |
|
159
|
|
|
{ |
|
160
|
|
|
return new PayoneHandler(); |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
/** |
|
164
|
|
|
* @return \SprykerEco\Yves\Payone\Handler\ExpressCheckoutHandlerInterface |
|
165
|
|
|
*/ |
|
166
|
|
|
public function createExpressCheckoutHandler(): ExpressCheckoutHandlerInterface |
|
167
|
|
|
{ |
|
168
|
|
|
return new ExpressCheckoutHandler( |
|
169
|
|
|
$this->getPayoneClient(), |
|
170
|
|
|
$this->getCartClient(), |
|
171
|
|
|
$this->createQuoteHydrator(), |
|
172
|
|
|
$this->getConfig() |
|
173
|
|
|
); |
|
174
|
|
|
} |
|
175
|
|
|
|
|
176
|
|
|
/** |
|
177
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Plugin\Form\SubFormPluginInterface |
|
178
|
|
|
*/ |
|
179
|
|
|
public function createPrePaymentSubFormPlugin(): SubFormPluginInterface |
|
180
|
|
|
{ |
|
181
|
|
|
return new PayonePrePaymentSubFormPlugin(); |
|
182
|
|
|
} |
|
183
|
|
|
|
|
184
|
|
|
/** |
|
185
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Plugin\Form\SubFormPluginInterface |
|
186
|
|
|
*/ |
|
187
|
|
|
public function createCreditCardSubFormPlugin(): SubFormPluginInterface |
|
188
|
|
|
{ |
|
189
|
|
|
return new PayoneCreditCardSubFormPlugin(); |
|
190
|
|
|
} |
|
191
|
|
|
|
|
192
|
|
|
/** |
|
193
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
194
|
|
|
*/ |
|
195
|
|
|
public function createCreditCardSubForm(): AbstractPayoneSubForm |
|
196
|
|
|
{ |
|
197
|
|
|
return new CreditCardSubForm(); |
|
198
|
|
|
} |
|
199
|
|
|
|
|
200
|
|
|
/** |
|
201
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
202
|
|
|
*/ |
|
203
|
|
|
public function createCreditCardSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
204
|
|
|
{ |
|
205
|
|
|
return new CreditCardDataProvider(); |
|
206
|
|
|
} |
|
207
|
|
|
|
|
208
|
|
|
/** |
|
209
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
210
|
|
|
*/ |
|
211
|
|
|
public function createEWalletSubForm(): AbstractPayoneSubForm |
|
212
|
|
|
{ |
|
213
|
|
|
return new EWalletSubForm(); |
|
214
|
|
|
} |
|
215
|
|
|
|
|
216
|
|
|
/** |
|
217
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
218
|
|
|
*/ |
|
219
|
|
|
public function createEWalletSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
220
|
|
|
{ |
|
221
|
|
|
return new EWalletDataProvider(); |
|
222
|
|
|
} |
|
223
|
|
|
|
|
224
|
|
|
/** |
|
225
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
226
|
|
|
*/ |
|
227
|
|
|
public function createDirectDebitSubForm(): AbstractPayoneSubForm |
|
228
|
|
|
{ |
|
229
|
|
|
return new DirectDebitSubForm(); |
|
230
|
|
|
} |
|
231
|
|
|
|
|
232
|
|
|
/** |
|
233
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
234
|
|
|
*/ |
|
235
|
|
|
public function createDirectDebitSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
236
|
|
|
{ |
|
237
|
|
|
return new DirectDebitDataProvider( |
|
238
|
|
|
$this->getClientStore() |
|
239
|
|
|
); |
|
240
|
|
|
} |
|
241
|
|
|
|
|
242
|
|
|
/** |
|
243
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
244
|
|
|
*/ |
|
245
|
|
|
public function createEpsOnlineTransferSubForm(): AbstractPayoneSubForm |
|
246
|
|
|
{ |
|
247
|
|
|
return new EpsOnlineTransferSubForm(); |
|
248
|
|
|
} |
|
249
|
|
|
|
|
250
|
|
|
/** |
|
251
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
252
|
|
|
*/ |
|
253
|
|
|
public function createEpsOnlineTransferSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
254
|
|
|
{ |
|
255
|
|
|
return new EpsOnlineTransferDataProvider(); |
|
256
|
|
|
} |
|
257
|
|
|
|
|
258
|
|
|
/** |
|
259
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
260
|
|
|
*/ |
|
261
|
|
|
public function createGiropayOnlineTransferSubForm(): AbstractPayoneSubForm |
|
262
|
|
|
{ |
|
263
|
|
|
return new GiropayOnlineTransferSubForm(); |
|
264
|
|
|
} |
|
265
|
|
|
|
|
266
|
|
|
/** |
|
267
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
268
|
|
|
*/ |
|
269
|
|
|
public function createGiropayOnlineTransferSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
270
|
|
|
{ |
|
271
|
|
|
return new GiropayOnlineTransferDataProvider(); |
|
272
|
|
|
} |
|
273
|
|
|
|
|
274
|
|
|
/** |
|
275
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
276
|
|
|
*/ |
|
277
|
|
|
public function createInstantOnlineTransferSubForm(): AbstractPayoneSubForm |
|
278
|
|
|
{ |
|
279
|
|
|
return new InstantOnlineTransferSubForm(); |
|
280
|
|
|
} |
|
281
|
|
|
|
|
282
|
|
|
/** |
|
283
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
284
|
|
|
*/ |
|
285
|
|
|
public function createInstantOnlineTransferSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
286
|
|
|
{ |
|
287
|
|
|
return new InstantOnlineTransferDataProvider( |
|
288
|
|
|
$this->getClientStore(), |
|
289
|
|
|
); |
|
290
|
|
|
} |
|
291
|
|
|
|
|
292
|
|
|
/** |
|
293
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
294
|
|
|
*/ |
|
295
|
|
|
public function createIdealOnlineTransferSubForm(): AbstractPayoneSubForm |
|
296
|
|
|
{ |
|
297
|
|
|
return new IdealOnlineTransferSubForm(); |
|
298
|
|
|
} |
|
299
|
|
|
|
|
300
|
|
|
/** |
|
301
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
302
|
|
|
*/ |
|
303
|
|
|
public function createIdealOnlineTransferSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
304
|
|
|
{ |
|
305
|
|
|
return new IdealOnlineTransferDataProvider(); |
|
306
|
|
|
} |
|
307
|
|
|
|
|
308
|
|
|
/** |
|
309
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
310
|
|
|
*/ |
|
311
|
|
|
public function createPostfinanceEfinanceOnlineTransferSubForm(): AbstractPayoneSubForm |
|
312
|
|
|
{ |
|
313
|
|
|
return new PostfinanceEfinanceOnlineTransferSubForm(); |
|
314
|
|
|
} |
|
315
|
|
|
|
|
316
|
|
|
/** |
|
317
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
318
|
|
|
*/ |
|
319
|
|
|
public function createPostfinanceEfinanceOnlineTransferSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
320
|
|
|
{ |
|
321
|
|
|
return new PostfinanceEfinanceOnlineTransferDataProvider(); |
|
322
|
|
|
} |
|
323
|
|
|
|
|
324
|
|
|
/** |
|
325
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
326
|
|
|
*/ |
|
327
|
|
|
public function createPostfinanceCardOnlineTransferSubForm(): AbstractPayoneSubForm |
|
328
|
|
|
{ |
|
329
|
|
|
return new PostfinanceCardOnlineTransferSubForm(); |
|
330
|
|
|
} |
|
331
|
|
|
|
|
332
|
|
|
/** |
|
333
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
334
|
|
|
*/ |
|
335
|
|
|
public function createPostfinanceCardOnlineTransferSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
336
|
|
|
{ |
|
337
|
|
|
return new PostfinanceCardOnlineTransferDataProvider(); |
|
338
|
|
|
} |
|
339
|
|
|
|
|
340
|
|
|
/** |
|
341
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
342
|
|
|
*/ |
|
343
|
|
|
public function createPrzelewy24OnlineTransferSubForm(): AbstractPayoneSubForm |
|
344
|
|
|
{ |
|
345
|
|
|
return new Przelewy24OnlineTransferSubForm(); |
|
346
|
|
|
} |
|
347
|
|
|
|
|
348
|
|
|
/** |
|
349
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
350
|
|
|
*/ |
|
351
|
|
|
public function createPrzelewy24OnlineTransferSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
352
|
|
|
{ |
|
353
|
|
|
return new Przelewy24OnlineTransferDataProvider(); |
|
354
|
|
|
} |
|
355
|
|
|
|
|
356
|
|
|
/** |
|
357
|
|
|
* @return \SprykerEco\Yves\Payone\Form\AbstractPayoneSubForm |
|
358
|
|
|
*/ |
|
359
|
|
|
public function createBancontactOnlineTransferSubForm(): AbstractPayoneSubForm |
|
360
|
|
|
{ |
|
361
|
|
|
return new BancontactOnlineTransferSubForm(); |
|
362
|
|
|
} |
|
363
|
|
|
|
|
364
|
|
|
/** |
|
365
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
|
366
|
|
|
*/ |
|
367
|
|
|
public function createBancontactOnlineTransferSubFormDataProvider(): StepEngineFormDataProviderInterface |
|
368
|
|
|
{ |
|
369
|
|
|
return new BancontactOnlineTransferDataProvider($this->getConfig()); |
|
370
|
|
|
} |
|
371
|
|
|
|
|
372
|
|
|
/** |
|
373
|
|
|
* @return \SprykerEco\Client\Payone\PayoneClientInterface |
|
374
|
|
|
*/ |
|
375
|
|
|
public function getPayoneClient(): PayoneClientInterface |
|
376
|
|
|
{ |
|
377
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_PAYONE); |
|
378
|
|
|
} |
|
379
|
|
|
|
|
380
|
|
|
/** |
|
381
|
|
|
* @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToCartInterface |
|
382
|
|
|
*/ |
|
383
|
|
|
public function getCartClient(): PayoneToCartInterface |
|
384
|
|
|
{ |
|
385
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_CART); |
|
386
|
|
|
} |
|
387
|
|
|
|
|
388
|
|
|
/** |
|
389
|
|
|
* @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToCustomerInterface |
|
390
|
|
|
*/ |
|
391
|
|
|
public function getCustomerClient(): PayoneToCustomerInterface |
|
392
|
|
|
{ |
|
393
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_CUSTOMER); |
|
394
|
|
|
} |
|
395
|
|
|
|
|
396
|
|
|
/** |
|
397
|
|
|
* @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToShipmentInterface |
|
398
|
|
|
*/ |
|
399
|
|
|
public function getShipmentClient(): PayoneToShipmentInterface |
|
400
|
|
|
{ |
|
401
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_SHIPMENT); |
|
402
|
|
|
} |
|
403
|
|
|
|
|
404
|
|
|
/** |
|
405
|
|
|
* @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToCalculationInterface |
|
406
|
|
|
*/ |
|
407
|
|
|
public function getCalculationClient(): PayoneToCalculationInterface |
|
408
|
|
|
{ |
|
409
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_CALCULATION); |
|
410
|
|
|
} |
|
411
|
|
|
|
|
412
|
|
|
/** |
|
413
|
|
|
* @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToQuoteClientInterface |
|
414
|
|
|
*/ |
|
415
|
|
|
public function getQuoteClient(): PayoneToQuoteClientInterface |
|
416
|
|
|
{ |
|
417
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_QUOTE); |
|
418
|
|
|
} |
|
419
|
|
|
|
|
420
|
|
|
/** |
|
421
|
|
|
* @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToStoreClientInterface |
|
422
|
|
|
*/ |
|
423
|
|
|
public function getClientStore(): PayoneToStoreClientInterface |
|
424
|
|
|
{ |
|
425
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_STORE); |
|
426
|
|
|
} |
|
427
|
|
|
|
|
428
|
|
|
/** |
|
429
|
|
|
* @return \SprykerEco\Yves\Payone\Handler\ExpressCheckout\QuoteHydratorInterface |
|
430
|
|
|
*/ |
|
431
|
|
|
public function createQuoteHydrator(): QuoteHydratorInterface |
|
432
|
|
|
{ |
|
433
|
|
|
return new QuoteHydrator( |
|
434
|
|
|
$this->getShipmentClient(), |
|
435
|
|
|
$this->getCustomerClient(), |
|
436
|
|
|
$this->getCalculationClient() |
|
437
|
|
|
); |
|
438
|
|
|
} |
|
439
|
|
|
|
|
440
|
|
|
/** |
|
441
|
|
|
* @return \SprykerEco\Yves\Payone\Model\StoreReaderInterface |
|
442
|
|
|
*/ |
|
443
|
|
|
public function createStoreReader(): StoreReaderInterface |
|
444
|
|
|
{ |
|
445
|
|
|
if ($this->storeReader === null) { |
|
446
|
|
|
$this->storeReader = new StoreReader($this->getClientStore()); |
|
447
|
|
|
} |
|
448
|
|
|
|
|
449
|
|
|
return $this->storeReader; |
|
|
|
|
|
|
450
|
|
|
} |
|
451
|
|
|
} |
|
452
|
|
|
|