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\Braintree\Business; |
9
|
|
|
|
10
|
|
|
use Spryker\Zed\Kernel\Business\AbstractBusinessFactory; |
11
|
|
|
use SprykerEco\Zed\Braintree\BraintreeDependencyProvider; |
12
|
|
|
use SprykerEco\Zed\Braintree\Business\Checkout\CheckoutPaymentChecker; |
13
|
|
|
use SprykerEco\Zed\Braintree\Business\Checkout\CheckoutPaymentCheckerInterface; |
14
|
|
|
use SprykerEco\Zed\Braintree\Business\Hook\CheckoutPostSaveHook; |
15
|
|
|
use SprykerEco\Zed\Braintree\Business\Hook\CheckoutPostSaveHookInterface; |
16
|
|
|
use SprykerEco\Zed\Braintree\Business\Hook\PostSaveHook; |
17
|
|
|
use SprykerEco\Zed\Braintree\Business\Hook\PostSaveHookInterface; |
18
|
|
|
use SprykerEco\Zed\Braintree\Business\Log\TransactionStatusLog; |
19
|
|
|
use SprykerEco\Zed\Braintree\Business\Log\TransactionStatusLogInterface; |
20
|
|
|
use SprykerEco\Zed\Braintree\Business\Order\Saver; |
21
|
|
|
use SprykerEco\Zed\Braintree\Business\Order\SaverInterface; |
22
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Filter\PaypalExpressPaymentMethodFilter; |
23
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Filter\PaypalExpressPaymentMethodFilterInterface; |
24
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\AuthorizeTransaction; |
25
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\CaptureItemsTransaction; |
26
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\CaptureOrderTransaction; |
27
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\AuthorizeTransactionHandler; |
28
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\AuthorizeTransactionHandlerInterface; |
29
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\CaptureItemsTransactionHandler; |
30
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\CaptureItemsTransactionHandlerInterface; |
31
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\CaptureOrderTransactionHandler; |
32
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\CaptureOrderTransactionHandlerInterface; |
33
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\PaymentTransactionHandler; |
34
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\PaymentTransactionHandlerInterface; |
35
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\PreCheckTransactionHandler; |
36
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\PreCheckTransactionHandlerInterface; |
37
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RefundItemsTransactionHandler; |
38
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RefundItemsTransactionHandlerInterface; |
39
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RefundOrderTransactionHandler; |
40
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RefundOrderTransactionHandlerInterface; |
41
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RevertTransactionHandler; |
42
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RevertTransactionHandlerInterface; |
43
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\ShipmentRefundTransactionHandler; |
44
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\ShipmentRefundTransactionHandlerInterface; |
45
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\ShipmentTransactionHandler; |
46
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\ShipmentTransactionHandlerInterface; |
47
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\MetaVisitor\PaymentTransactionMetaVisitor; |
48
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\MetaVisitor\TransactionMetaVisitorComposite; |
49
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\MetaVisitor\TransactionMetaVisitorInterface; |
50
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\PaymentTransaction; |
51
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\PreCheckTransaction; |
52
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\RefundItemsTransaction; |
53
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\RefundOrderTransaction; |
54
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\RevertTransaction; |
55
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\ShipmentRefundTransaction; |
56
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\ShipmentTransaction; |
57
|
|
|
use SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface; |
58
|
|
|
use SprykerEco\Zed\Braintree\Dependency\Facade\BraintreeToMoneyFacadeInterface; |
59
|
|
|
use SprykerEco\Zed\Braintree\Dependency\Facade\BraintreeToRefundFacadeInterface; |
60
|
|
|
use SprykerEco\Zed\Braintree\Dependency\Facade\BraintreeToSalesFacadeInterface; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @method \SprykerEco\Zed\Braintree\Persistence\BraintreeQueryContainerInterface getQueryContainer() |
64
|
|
|
* @method \SprykerEco\Zed\Braintree\BraintreeConfig getConfig() |
65
|
|
|
* @method \SprykerEco\Zed\Braintree\Persistence\BraintreeRepositoryInterface getRepository() |
66
|
|
|
* @method \SprykerEco\Zed\Braintree\Persistence\BraintreeEntityManagerInterface getEntityManager() |
67
|
|
|
* @SuppressWarnings(PHPMD.CouplingBetweenObjects) |
68
|
|
|
*/ |
69
|
|
|
class BraintreeBusinessFactory extends AbstractBusinessFactory |
70
|
|
|
{ |
71
|
|
|
/** |
72
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\AuthorizeTransactionHandlerInterface |
73
|
|
|
*/ |
74
|
|
|
public function createAuthorizeTransactionHandler(): AuthorizeTransactionHandlerInterface |
75
|
|
|
{ |
76
|
|
|
return new AuthorizeTransactionHandler( |
77
|
|
|
$this->createAuthorizeTransaction(), |
78
|
|
|
$this->createDefaultTransactionMetaVisitor() |
79
|
|
|
); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\CaptureItemsTransactionHandlerInterface |
84
|
|
|
*/ |
85
|
|
|
public function createCaptureItemsTransactionHandler(): CaptureItemsTransactionHandlerInterface |
86
|
|
|
{ |
87
|
|
|
return new CaptureItemsTransactionHandler( |
88
|
|
|
$this->createCaptureItemsTransaction(), |
89
|
|
|
$this->createDefaultTransactionMetaVisitor() |
90
|
|
|
); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\CaptureOrderTransactionHandlerInterface |
95
|
|
|
*/ |
96
|
|
|
public function createCaptureOrderTransactionHandler(): CaptureOrderTransactionHandlerInterface |
97
|
|
|
{ |
98
|
|
|
return new CaptureOrderTransactionHandler( |
99
|
|
|
$this->createCaptureOrderTransaction(), |
100
|
|
|
$this->createDefaultTransactionMetaVisitor() |
101
|
|
|
); |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\PreCheckTransactionHandlerInterface |
106
|
|
|
*/ |
107
|
|
|
public function createPreCheckTransactionHandler(): PreCheckTransactionHandlerInterface |
108
|
|
|
{ |
109
|
|
|
return new PreCheckTransactionHandler( |
110
|
|
|
$this->createPreCheckTransaction(), |
111
|
|
|
$this->createDefaultTransactionMetaVisitor() |
112
|
|
|
); |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\PaymentTransactionHandlerInterface |
117
|
|
|
*/ |
118
|
|
|
public function createPaymentTransactionHandler(): PaymentTransactionHandlerInterface |
119
|
|
|
{ |
120
|
|
|
return new PaymentTransactionHandler( |
121
|
|
|
$this->createPaymentTransaction(), |
122
|
|
|
$this->createDefaultTransactionMetaVisitor() |
123
|
|
|
); |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RefundOrderTransactionHandlerInterface |
128
|
|
|
*/ |
129
|
|
|
public function createRefundOrderTransactionHandler(): RefundOrderTransactionHandlerInterface |
130
|
|
|
{ |
131
|
|
|
return new RefundOrderTransactionHandler( |
132
|
|
|
$this->createRefundOrderTransaction(), |
133
|
|
|
$this->createDefaultTransactionMetaVisitor(), |
134
|
|
|
$this->getRefundFacade() |
135
|
|
|
); |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RefundItemsTransactionHandlerInterface |
140
|
|
|
*/ |
141
|
|
|
public function createRefundItemsTransactionHandler(): RefundItemsTransactionHandlerInterface |
142
|
|
|
{ |
143
|
|
|
return new RefundItemsTransactionHandler( |
144
|
|
|
$this->createRefundItemsTransaction(), |
145
|
|
|
$this->createDefaultTransactionMetaVisitor(), |
146
|
|
|
$this->getRefundFacade(), |
147
|
|
|
$this->getRepository() |
148
|
|
|
); |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\RevertTransactionHandlerInterface |
153
|
|
|
*/ |
154
|
|
|
public function createRevertTransactionHandler(): RevertTransactionHandlerInterface |
155
|
|
|
{ |
156
|
|
|
return new RevertTransactionHandler( |
157
|
|
|
$this->createRevertTransaction(), |
158
|
|
|
$this->createDefaultTransactionMetaVisitor() |
159
|
|
|
); |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Order\SaverInterface |
164
|
|
|
*/ |
165
|
|
|
public function createOrderSaver(): SaverInterface |
166
|
|
|
{ |
167
|
|
|
return new Saver($this->getEntityManager()); |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Log\TransactionStatusLogInterface |
172
|
|
|
*/ |
173
|
|
|
public function createTransactionStatusLog(): TransactionStatusLogInterface |
174
|
|
|
{ |
175
|
|
|
return new TransactionStatusLog($this->getRepository()); |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Hook\PostSaveHookInterface |
180
|
|
|
*/ |
181
|
|
|
public function createPostSaveHook(): PostSaveHookInterface |
182
|
|
|
{ |
183
|
|
|
return new PostSaveHook($this->getRepository()); |
184
|
|
|
} |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
188
|
|
|
*/ |
189
|
|
|
public function createAuthorizeTransaction(): TransactionInterface |
190
|
|
|
{ |
191
|
|
|
return new AuthorizeTransaction($this->getConfig()); |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\MetaVisitor\TransactionMetaVisitorInterface |
196
|
|
|
*/ |
197
|
|
|
public function createDefaultTransactionMetaVisitor(): TransactionMetaVisitorInterface |
198
|
|
|
{ |
199
|
|
|
$transactionMetaVisitorComposite = $this->createTransactionMetaVisitorComposite(); |
200
|
|
|
$transactionMetaVisitorComposite->addVisitor($this->createPaymentTransactionMetaVisitor()); |
201
|
|
|
|
202
|
|
|
return $transactionMetaVisitorComposite; |
203
|
|
|
} |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\MetaVisitor\TransactionMetaVisitorInterface|\SprykerEco\Zed\Braintree\Business\Payment\Transaction\MetaVisitor\TransactionMetaVisitorComposite |
207
|
|
|
*/ |
208
|
|
|
public function createTransactionMetaVisitorComposite(): TransactionMetaVisitorInterface |
209
|
|
|
{ |
210
|
|
|
return new TransactionMetaVisitorComposite(); |
211
|
|
|
} |
212
|
|
|
|
213
|
|
|
/** |
214
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\MetaVisitor\TransactionMetaVisitorInterface |
215
|
|
|
*/ |
216
|
|
|
public function createPaymentTransactionMetaVisitor(): TransactionMetaVisitorInterface |
217
|
|
|
{ |
218
|
|
|
return new PaymentTransactionMetaVisitor($this->getRepository()); |
219
|
|
|
} |
220
|
|
|
|
221
|
|
|
/** |
222
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
223
|
|
|
*/ |
224
|
|
|
public function createCaptureOrderTransaction(): TransactionInterface |
225
|
|
|
{ |
226
|
|
|
return new CaptureOrderTransaction($this->getConfig()); |
227
|
|
|
} |
228
|
|
|
|
229
|
|
|
/** |
230
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
231
|
|
|
*/ |
232
|
|
|
public function createCaptureItemsTransaction(): TransactionInterface |
233
|
|
|
{ |
234
|
|
|
return new CaptureItemsTransaction( |
235
|
|
|
$this->getConfig(), |
236
|
|
|
$this->getMoneyFacade(), |
237
|
|
|
$this->getRepository(), |
238
|
|
|
$this->getEntityManager(), |
239
|
|
|
$this->getSalesFacade(), |
240
|
|
|
$this->createShipmentTransactionHandler() |
241
|
|
|
); |
242
|
|
|
} |
243
|
|
|
|
244
|
|
|
/** |
245
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
246
|
|
|
*/ |
247
|
|
|
public function createShipmentTransaction(): TransactionInterface |
248
|
|
|
{ |
249
|
|
|
return new ShipmentTransaction( |
250
|
|
|
$this->getConfig(), |
251
|
|
|
$this->getEntityManager() |
252
|
|
|
); |
253
|
|
|
} |
254
|
|
|
|
255
|
|
|
/** |
256
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
257
|
|
|
*/ |
258
|
|
|
public function createShipmentRefundTransaction(): TransactionInterface |
259
|
|
|
{ |
260
|
|
|
return new ShipmentRefundTransaction( |
261
|
|
|
$this->getConfig(), |
262
|
|
|
$this->getEntityManager() |
263
|
|
|
); |
264
|
|
|
} |
265
|
|
|
|
266
|
|
|
/** |
267
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\ShipmentTransactionHandlerInterface |
268
|
|
|
*/ |
269
|
|
|
public function createShipmentTransactionHandler(): ShipmentTransactionHandlerInterface |
270
|
|
|
{ |
271
|
|
|
return new ShipmentTransactionHandler( |
272
|
|
|
$this->createShipmentTransaction(), |
273
|
|
|
$this->createDefaultTransactionMetaVisitor() |
274
|
|
|
); |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\Handler\ShipmentRefundTransactionHandlerInterface |
279
|
|
|
*/ |
280
|
|
|
public function createShipmentRefundTransactionHandler(): ShipmentRefundTransactionHandlerInterface |
281
|
|
|
{ |
282
|
|
|
return new ShipmentRefundTransactionHandler( |
283
|
|
|
$this->createShipmentRefundTransaction(), |
284
|
|
|
$this->createDefaultTransactionMetaVisitor() |
285
|
|
|
); |
286
|
|
|
} |
287
|
|
|
|
288
|
|
|
/** |
289
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
290
|
|
|
*/ |
291
|
|
|
public function createPreCheckTransaction(): TransactionInterface |
292
|
|
|
{ |
293
|
|
|
return new PreCheckTransaction($this->getConfig(), $this->getMoneyFacade()); |
294
|
|
|
} |
295
|
|
|
|
296
|
|
|
/** |
297
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
298
|
|
|
*/ |
299
|
|
|
public function createPaymentTransaction(): TransactionInterface |
300
|
|
|
{ |
301
|
|
|
return new PaymentTransaction($this->getConfig(), $this->getMoneyFacade()); |
302
|
|
|
} |
303
|
|
|
|
304
|
|
|
/** |
305
|
|
|
* @return \SprykerEco\Zed\Braintree\Dependency\Facade\BraintreeToMoneyFacadeInterface |
306
|
|
|
*/ |
307
|
|
|
public function getMoneyFacade(): BraintreeToMoneyFacadeInterface |
308
|
|
|
{ |
309
|
|
|
return $this->getProvidedDependency(BraintreeDependencyProvider::FACADE_MONEY); |
310
|
|
|
} |
311
|
|
|
|
312
|
|
|
/** |
313
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
314
|
|
|
*/ |
315
|
|
|
public function createRefundOrderTransaction(): TransactionInterface |
316
|
|
|
{ |
317
|
|
|
return new RefundOrderTransaction( |
318
|
|
|
$this->getConfig(), |
319
|
|
|
$this->getMoneyFacade(), |
320
|
|
|
$this->createShipmentRefundTransactionHandler(), |
321
|
|
|
$this->getRepository() |
322
|
|
|
); |
323
|
|
|
} |
324
|
|
|
|
325
|
|
|
/** |
326
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
327
|
|
|
*/ |
328
|
|
|
public function createRefundItemsTransaction(): TransactionInterface |
329
|
|
|
{ |
330
|
|
|
return new RefundItemsTransaction( |
331
|
|
|
$this->getConfig(), |
332
|
|
|
$this->getMoneyFacade(), |
333
|
|
|
$this->createShipmentRefundTransactionHandler(), |
334
|
|
|
$this->getRepository() |
335
|
|
|
); |
336
|
|
|
} |
337
|
|
|
|
338
|
|
|
/** |
339
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Transaction\TransactionInterface |
340
|
|
|
*/ |
341
|
|
|
public function createRevertTransaction(): TransactionInterface |
342
|
|
|
{ |
343
|
|
|
return new RevertTransaction($this->getConfig()); |
344
|
|
|
} |
345
|
|
|
|
346
|
|
|
/** |
347
|
|
|
* @return \SprykerEco\Zed\Braintree\Dependency\Facade\BraintreeToRefundFacadeInterface |
348
|
|
|
*/ |
349
|
|
|
public function getRefundFacade(): BraintreeToRefundFacadeInterface |
350
|
|
|
{ |
351
|
|
|
return $this->getProvidedDependency(BraintreeDependencyProvider::FACADE_REFUND); |
352
|
|
|
} |
353
|
|
|
|
354
|
|
|
/** |
355
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Payment\Filter\PaypalExpressPaymentMethodFilterInterface |
356
|
|
|
*/ |
357
|
|
|
public function createPaypalExpressCheckoutPaymentMethod(): PaypalExpressPaymentMethodFilterInterface |
358
|
|
|
{ |
359
|
|
|
return new PaypalExpressPaymentMethodFilter(); |
360
|
|
|
} |
361
|
|
|
|
362
|
|
|
/** |
363
|
|
|
* @return \SprykerEco\Zed\Braintree\Dependency\Facade\BraintreeToSalesFacadeInterface |
364
|
|
|
*/ |
365
|
|
|
public function getSalesFacade(): BraintreeToSalesFacadeInterface |
366
|
|
|
{ |
367
|
|
|
return $this->getProvidedDependency(BraintreeDependencyProvider::FACADE_SALES); |
368
|
|
|
} |
369
|
|
|
|
370
|
|
|
/** |
371
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Checkout\CheckoutPaymentCheckerInterface |
372
|
|
|
*/ |
373
|
|
|
public function createCheckoutPaymentChecker(): CheckoutPaymentCheckerInterface |
374
|
|
|
{ |
375
|
|
|
return new CheckoutPaymentChecker(); |
376
|
|
|
} |
377
|
|
|
|
378
|
|
|
/** |
379
|
|
|
* @return \SprykerEco\Zed\Braintree\Business\Hook\CheckoutPostSaveHookInterface; |
380
|
|
|
*/ |
381
|
|
|
public function createCheckoutPostSaveHook(): CheckoutPostSaveHookInterface |
382
|
|
|
{ |
383
|
|
|
return new CheckoutPostSaveHook( |
384
|
|
|
$this->createPaymentTransactionHandler(), |
385
|
|
|
$this->createOrderSaver() |
386
|
|
|
); |
387
|
|
|
} |
388
|
|
|
} |
389
|
|
|
|