Passed
Pull Request — master (#57)
by Roman
08:36 queued 17s
created

PayoneFacade::distributePrices()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
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\Zed\Payone\Business;
9
10
use Generated\Shared\Transfer\AddressCheckResponseTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...ssCheckResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use Generated\Shared\Transfer\CaptureResponseTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\CaptureResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use Generated\Shared\Transfer\CheckoutResponseTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\CheckoutResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
use Generated\Shared\Transfer\ConsumerScoreResponseTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...erScoreResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
use Generated\Shared\Transfer\OrderCollectionTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\OrderCollectionTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
use Generated\Shared\Transfer\OrderTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\OrderTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
use Generated\Shared\Transfer\PaymentDetailTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\PaymentDetailTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
use Generated\Shared\Transfer\PaymentMethodsTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\PaymentMethodsTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
use Generated\Shared\Transfer\PayoneBankAccountCheckTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...ankAccountCheckTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
use Generated\Shared\Transfer\PayoneCaptureTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\PayoneCaptureTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
use Generated\Shared\Transfer\PayoneCreditCardTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\PayoneCreditCardTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
21
use Generated\Shared\Transfer\PayoneGetFileTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\PayoneGetFileTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
22
use Generated\Shared\Transfer\PayoneGetInvoiceTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\PayoneGetInvoiceTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
23
use Generated\Shared\Transfer\PayoneGetSecurityInvoiceTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...SecurityInvoiceTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
24
use Generated\Shared\Transfer\PayoneInitPaypalExpressCheckoutRequestTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...CheckoutRequestTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
25
use Generated\Shared\Transfer\PayoneManageMandateTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...neManageMandateTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
26
use Generated\Shared\Transfer\PayonePartialOperationRequestTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...perationRequestTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
27
use Generated\Shared\Transfer\PayoneRefundTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\PayoneRefundTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
28
use Generated\Shared\Transfer\PayoneTransactionStatusUpdateTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...ionStatusUpdateTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
29
use Generated\Shared\Transfer\QuoteTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\QuoteTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
30
use Generated\Shared\Transfer\RefundResponseTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\RefundResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
31
use Spryker\Zed\Kernel\Business\AbstractFacade;
32
33
/**
34
 * @method \SprykerEco\Zed\Payone\Business\PayoneBusinessFactory getFactory()
35
 */
36
class PayoneFacade extends AbstractFacade implements PayoneFacadeInterface
37
{
38
    /**
39
     * {@inheritDoc}
40
     *
41
     * @api
42
     *
43
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
44
     * @param \Generated\Shared\Transfer\CheckoutResponseTransfer $checkoutResponse
45
     *
46
     * @return void
47
     */
48
    public function saveOrder(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponse)
49
    {
50
        $this->getFactory()->createOrderManager()->saveOrder($quoteTransfer, $checkoutResponse);
51
    }
52
53
    /**
54
     * {@inheritDoc}
55
     *
56
     * @api
57
     *
58
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
59
     *
60
     * @return \Generated\Shared\Transfer\AuthorizationResponseTransfer
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...izationResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
61
     */
62
    public function authorizePayment(OrderTransfer $orderTransfer)
63
    {
64
        return $this->getFactory()->createPaymentManager()->authorizePayment($orderTransfer);
65
    }
66
67
    /**
68
     * {@inheritDoc}
69
     *
70
     * @api
71
     *
72
     * @param int $idSalesOrder
73
     *
74
     * @return \Generated\Shared\Transfer\AuthorizationResponseTransfer
75
     */
76
    public function preAuthorizePayment($idSalesOrder)
77
    {
78
        return $this->getFactory()->createPaymentManager()->preAuthorizePayment($idSalesOrder);
79
    }
80
81
    /**
82
     * {@inheritDoc}
83
     *
84
     * @api
85
     *
86
     * @param \Generated\Shared\Transfer\PayoneCaptureTransfer $captureTransfer
87
     *
88
     * @return \Generated\Shared\Transfer\CaptureResponseTransfer
89
     */
90
    public function capturePayment(PayoneCaptureTransfer $captureTransfer): CaptureResponseTransfer
91
    {
92
        return $this->getFactory()->createPaymentManager()->capturePayment($captureTransfer);
93
    }
94
95
    /**
96
     * {@inheritDoc}
97
     *
98
     * @api
99
     *
100
     * @param int $idPayment
101
     *
102
     * @return \Generated\Shared\Transfer\DebitResponseTransfer
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\DebitResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
103
     */
104
    public function debitPayment($idPayment)
105
    {
106
        return $this->getFactory()->createPaymentManager()->debitPayment($idPayment);
107
    }
108
109
    /**
110
     * {@inheritDoc}
111
     *
112
     * @api
113
     *
114
     * @param \Generated\Shared\Transfer\PayoneRefundTransfer $refundTransfer
115
     *
116
     * @return \Generated\Shared\Transfer\RefundResponseTransfer
117
     */
118
    public function refundPayment(PayoneRefundTransfer $refundTransfer)
119
    {
120
        return $this->getFactory()->createPaymentManager()->refundPayment($refundTransfer);
121
    }
122
123
    /**
124
     * {@inheritDoc}
125
     *
126
     * @api
127
     *
128
     * @param \Generated\Shared\Transfer\PayonePartialOperationRequestTransfer $payonePartialOperationRequestTransfer
129
     *
130
     * @return \Generated\Shared\Transfer\RefundResponseTransfer
131
     */
132
    public function executePartialRefund(PayonePartialOperationRequestTransfer $payonePartialOperationRequestTransfer): RefundResponseTransfer
133
    {
134
        return $this->getFactory()->createPaymentManager()->executePartialRefund($payonePartialOperationRequestTransfer);
135
    }
136
137
    /**
138
     * {@inheritDoc}
139
     *
140
     * @api
141
     *
142
     * @param \Generated\Shared\Transfer\PayoneCreditCardTransfer $creditCardData
143
     *
144
     * @return \Generated\Shared\Transfer\CreditCardCheckResponseTransfer
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...rdCheckResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
145
     */
146
    public function creditCardCheck(PayoneCreditCardTransfer $creditCardData)
147
    {
148
        return $this->getFactory()->createPaymentManager()->creditCardCheck($creditCardData);
149
    }
150
151
    /**
152
     * {@inheritDoc}
153
     *
154
     * @api
155
     *
156
     * @param \Generated\Shared\Transfer\PayoneBankAccountCheckTransfer $bankAccountCheckTransfer
157
     *
158
     * @return \Generated\Shared\Transfer\PayoneBankAccountCheckTransfer
159
     */
160
    public function bankAccountCheck(PayoneBankAccountCheckTransfer $bankAccountCheckTransfer)
161
    {
162
        return $this->getFactory()->createPaymentManager()->bankAccountCheck($bankAccountCheckTransfer);
163
    }
164
165
    /**
166
     * {@inheritDoc}
167
     *
168
     * @api
169
     *
170
     * @param \Generated\Shared\Transfer\PayoneManageMandateTransfer $manageMandateTransfer
171
     *
172
     * @return \Generated\Shared\Transfer\PayoneManageMandateTransfer
173
     */
174
    public function manageMandate(PayoneManageMandateTransfer $manageMandateTransfer)
175
    {
176
        return $this->getFactory()->createPaymentManager()->manageMandate($manageMandateTransfer);
177
    }
178
179
    /**
180
     * {@inheritDoc}
181
     *
182
     * @api
183
     *
184
     * @param \Generated\Shared\Transfer\PayoneGetFileTransfer $getFileTransfer
185
     *
186
     * @return \Generated\Shared\Transfer\PayoneGetFileTransfer
187
     */
188
    public function getFile(PayoneGetFileTransfer $getFileTransfer)
189
    {
190
        return $this->getFactory()->createPaymentManager()->getFile($getFileTransfer);
191
    }
192
193
    /**
194
     * {@inheritDoc}
195
     *
196
     * @api
197
     *
198
     * @param \Generated\Shared\Transfer\PayoneGetInvoiceTransfer $getInvoiceTransfer
199
     *
200
     * @return \Generated\Shared\Transfer\PayoneGetInvoiceTransfer
201
     */
202
    public function getInvoice(PayoneGetInvoiceTransfer $getInvoiceTransfer)
203
    {
204
        return $this->getFactory()->createPaymentManager()->getInvoice($getInvoiceTransfer);
205
    }
206
207
    /**
208
     * {@inheritDoc}
209
     *
210
     * @api
211
     *
212
     * @param \Generated\Shared\Transfer\PayoneGetSecurityInvoiceTransfer $getSecurityInvoiceTransfer
213
     *
214
     * @return \Generated\Shared\Transfer\PayoneGetSecurityInvoiceTransfer
215
     */
216
    public function getSecurityInvoice(PayoneGetSecurityInvoiceTransfer $getSecurityInvoiceTransfer): PayoneGetSecurityInvoiceTransfer
217
    {
218
        return $this->getFactory()->createPaymentManager()->getSecurityInvoice($getSecurityInvoiceTransfer);
219
    }
220
221
    /**
222
     * {@inheritDoc}
223
     *
224
     * @api
225
     *
226
     * @param \Generated\Shared\Transfer\PayoneTransactionStatusUpdateTransfer $transactionStatusUpdateTransfer
227
     *
228
     * @return \Generated\Shared\Transfer\PayoneTransactionStatusUpdateTransfer
229
     */
230
    public function processTransactionStatusUpdate(PayoneTransactionStatusUpdateTransfer $transactionStatusUpdateTransfer)
231
    {
232
        $transactionManager = $this->getFactory()->createTransactionStatusManager();
233
        $transactionTransfer = $this->getFactory()->createTransactionStatusUpdateRequest($transactionStatusUpdateTransfer);
234
        $response = $transactionManager->processTransactionStatusUpdate($transactionTransfer);
235
        $transactionStatusUpdateTransfer->setIsSuccess($response->isSuccess());
236
        $transactionStatusUpdateTransfer->setResponse($response->getStatus() . ($response->getErrorMessage() ? ': ' . $response->getErrorMessage() : ''));
237
238
        return $transactionStatusUpdateTransfer;
239
    }
240
241
    /**
242
     * {@inheritDoc}
243
     *
244
     * @api
245
     *
246
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
247
     *
248
     * @return bool
249
     */
250
    public function isAuthorizationApproved(OrderTransfer $orderTransfer)
251
    {
252
        return $this->getFactory()->createApiLogFinder()->isAuthorizationApproved($orderTransfer);
253
    }
254
255
    /**
256
     * {@inheritDoc}
257
     *
258
     * @api
259
     *
260
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
261
     *
262
     * @return bool
263
     */
264
    public function isAuthorizationRedirect(OrderTransfer $orderTransfer)
265
    {
266
        return $this->getFactory()->createApiLogFinder()->isAuthorizationRedirect($orderTransfer);
267
    }
268
269
    /**
270
     * {@inheritDoc}
271
     *
272
     * @api
273
     *
274
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
275
     *
276
     * @return bool
277
     */
278
    public function isPreauthorizationApproved(OrderTransfer $orderTransfer)
279
    {
280
        return $this->getFactory()->createApiLogFinder()->isPreAuthorizationApproved($orderTransfer);
281
    }
282
283
    /**
284
     * {@inheritDoc}
285
     *
286
     * @api
287
     *
288
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
289
     *
290
     * @return bool
291
     */
292
    public function isPreauthorizationRedirect(OrderTransfer $orderTransfer)
293
    {
294
        return $this->getFactory()->createApiLogFinder()->isPreAuthorizationRedirect($orderTransfer);
295
    }
296
297
    /**
298
     * {@inheritDoc}
299
     *
300
     * @api
301
     *
302
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
303
     *
304
     * @return bool
305
     */
306
    public function isPreAuthorizationError(OrderTransfer $orderTransfer)
307
    {
308
        return $this->getFactory()->createApiLogFinder()->isPreAuthorizationError($orderTransfer);
309
    }
310
311
    /**
312
     * {@inheritDoc}
313
     *
314
     * @api
315
     *
316
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
317
     *
318
     * @return bool
319
     */
320
    public function isAuthorizationError(OrderTransfer $orderTransfer)
321
    {
322
        return $this->getFactory()->createApiLogFinder()->isAuthorizationError($orderTransfer);
323
    }
324
325
    /**
326
     * {@inheritDoc}
327
     *
328
     * @api
329
     *
330
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
331
     *
332
     * @return bool
333
     */
334
    public function isCaptureApproved(OrderTransfer $orderTransfer)
335
    {
336
        return $this->getFactory()->createApiLogFinder()->isCaptureApproved($orderTransfer);
337
    }
338
339
    /**
340
     * {@inheritDoc}
341
     *
342
     * @api
343
     *
344
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
345
     *
346
     * @return bool
347
     */
348
    public function isCaptureError(OrderTransfer $orderTransfer)
349
    {
350
        return $this->getFactory()->createApiLogFinder()->isCaptureError($orderTransfer);
351
    }
352
353
    /**
354
     * {@inheritDoc}
355
     *
356
     * @api
357
     *
358
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
359
     *
360
     * @return bool
361
     */
362
    public function isRefundApproved(OrderTransfer $orderTransfer)
363
    {
364
        return $this->getFactory()->createApiLogFinder()->isRefundApproved($orderTransfer);
365
    }
366
367
    /**
368
     * {@inheritDoc}
369
     *
370
     * @api
371
     *
372
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
373
     *
374
     * @return bool
375
     */
376
    public function isRefundError(OrderTransfer $orderTransfer)
377
    {
378
        return $this->getFactory()->createApiLogFinder()->isRefundError($orderTransfer);
379
    }
380
381
    /**
382
     * {@inheritDoc}
383
     *
384
     * @api
385
     *
386
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
387
     *
388
     * @return bool
389
     */
390
    public function isRefundPossible(OrderTransfer $orderTransfer)
391
    {
392
        return $this->getFactory()->createPaymentManager()->isRefundPossible($orderTransfer);
393
    }
394
395
    /**
396
     * {@inheritDoc}
397
     *
398
     * @api
399
     *
400
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
401
     *
402
     * @return bool
403
     */
404
    public function isPaymentDataRequired(OrderTransfer $orderTransfer)
405
    {
406
        return $this->getFactory()->createPaymentManager()->isPaymentDataRequired($orderTransfer);
407
    }
408
409
    /**
410
     * {@inheritDoc}
411
     *
412
     * @api
413
     *
414
     * @param int $idSalesOrder
415
     * @param int $idSalesOrderItem
416
     *
417
     * @return bool
418
     */
419
    public function isPaymentNotificationAvailable($idSalesOrder, $idSalesOrderItem)
420
    {
421
        return $this->getFactory()
422
            ->createTransactionStatusManager()
423
            ->isPaymentNotificationAvailable($idSalesOrder, $idSalesOrderItem);
424
    }
425
426
    /**
427
     * {@inheritDoc}
428
     *
429
     * @api
430
     *
431
     * @param int $idSalesOrder
432
     * @param int $idSalesOrderItem
433
     *
434
     * @return bool
435
     */
436
    public function isPaymentPaid($idSalesOrder, $idSalesOrderItem)
437
    {
438
        return $this->getFactory()
439
            ->createTransactionStatusManager()
440
            ->isPaymentPaid($idSalesOrder, $idSalesOrderItem);
441
    }
442
443
    /**
444
     * {@inheritDoc}
445
     *
446
     * @api
447
     *
448
     * @param int $idSalesOrder
449
     * @param int $idSalesOrderItem
450
     *
451
     * @return bool
452
     */
453
    public function isPaymentOverpaid($idSalesOrder, $idSalesOrderItem)
454
    {
455
        return $this->getFactory()
456
            ->createTransactionStatusManager()
457
            ->isPaymentOverpaid($idSalesOrder, $idSalesOrderItem);
458
    }
459
460
    /**
461
     * {@inheritDoc}
462
     *
463
     * @api
464
     *
465
     * @param int $idSalesOrder
466
     * @param int $idSalesOrderItem
467
     *
468
     * @return bool
469
     */
470
    public function isPaymentUnderpaid($idSalesOrder, $idSalesOrderItem)
471
    {
472
        return $this->getFactory()
473
            ->createTransactionStatusManager()
474
            ->isPaymentUnderpaid($idSalesOrder, $idSalesOrderItem);
475
    }
476
477
    /**
478
     * {@inheritDoc}
479
     *
480
     * @api
481
     *
482
     * @param int $idSalesOrder
483
     * @param int $idSalesOrderItem
484
     *
485
     * @return bool
486
     */
487
    public function isPaymentRefund($idSalesOrder, $idSalesOrderItem)
488
    {
489
        return $this->getFactory()
490
            ->createTransactionStatusManager()
491
            ->isPaymentRefund($idSalesOrder, $idSalesOrderItem);
492
    }
493
494
    /**
495
     * {@inheritDoc}
496
     *
497
     * @api
498
     *
499
     * @param int $idSalesOrder
500
     * @param int $idSalesOrderItem
501
     *
502
     * @return bool
503
     */
504
    public function isPaymentAppointed($idSalesOrder, $idSalesOrderItem)
505
    {
506
        return $this->getFactory()
507
            ->createTransactionStatusManager()
508
            ->isPaymentAppointed($idSalesOrder, $idSalesOrderItem);
509
    }
510
511
    /**
512
     * {@inheritDoc}
513
     *
514
     * @api
515
     *
516
     * @param int $idSalesOrder
517
     * @param int $idSalesOrderItem
518
     *
519
     * @return bool
520
     */
521
    public function isPaymentOther($idSalesOrder, $idSalesOrderItem)
522
    {
523
        return $this->getFactory()
524
            ->createTransactionStatusManager()
525
            ->isPaymentOther($idSalesOrder, $idSalesOrderItem);
526
    }
527
528
    /**
529
     * {@inheritDoc}
530
     *
531
     * @api
532
     *
533
     * @param int $idSalesOrder
534
     * @param int $idSalesOrderItem
535
     *
536
     * @return bool
537
     */
538
    public function isPaymentCapture($idSalesOrder, $idSalesOrderItem)
539
    {
540
        return $this->getFactory()
541
            ->createTransactionStatusManager()
542
            ->isPaymentCapture($idSalesOrder, $idSalesOrderItem);
543
    }
544
545
    /**
546
     * {@inheritDoc}
547
     *
548
     * @api
549
     *
550
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
551
     * @param \Generated\Shared\Transfer\CheckoutResponseTransfer $checkoutResponse
552
     *
553
     * @return \Generated\Shared\Transfer\CheckoutResponseTransfer
554
     */
555
    public function postSaveHook(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponse)
556
    {
557
        return $this->getFactory()
558
            ->createPaymentManager()
559
            ->postSaveHook($quoteTransfer, $checkoutResponse);
560
    }
561
562
    /**
563
     * {@inheritDoc}
564
     *
565
     * @api
566
     *
567
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
568
     * @param \Generated\Shared\Transfer\CheckoutResponseTransfer $checkoutResponse
569
     *
570
     * @return \Generated\Shared\Transfer\CheckoutResponseTransfer
571
     */
572
    public function executeCheckoutPostSaveHook(
573
        QuoteTransfer $quoteTransfer,
574
        CheckoutResponseTransfer $checkoutResponse
575
    ): CheckoutResponseTransfer {
576
        return $this->getFactory()
577
            ->createPaymentManager()
578
            ->executeCheckoutPostSaveHook($quoteTransfer, $checkoutResponse);
579
    }
580
581
    /**
582
     * {@inheritDoc}
583
     *
584
     * @api
585
     *
586
     * @param \Generated\Shared\Transfer\OrderCollectionTransfer $orderCollectionTransfer
587
     *
588
     * @return \Generated\Shared\Transfer\PayonePaymentLogCollectionTransfer
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...ntLogCollectionTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
589
     */
590
    public function getPaymentLogs(OrderCollectionTransfer $orderCollectionTransfer)
591
    {
592
        $orders = $orderCollectionTransfer->getOrders();
593
        return $this->getFactory()->createPaymentManager()->getPaymentLogs($orders);
594
    }
595
596
    /**
597
     * {@inheritDoc}
598
     *
599
     * @api
600
     *
601
     * @param int $idOrder
602
     *
603
     * @return \Generated\Shared\Transfer\PaymentDetailTransfer
604
     */
605
    public function getPaymentDetail($idOrder)
606
    {
607
        return $this->getFactory()->createPaymentManager()->getPaymentDetail($idOrder);
608
    }
609
610
    /**
611
     * {@inheritDoc}
612
     *
613
     * @api
614
     *
615
     * @param \Generated\Shared\Transfer\PaymentDetailTransfer $paymentData
616
     * @param int $idOrder
617
     *
618
     * @return void
619
     */
620
    public function updatePaymentDetail(PaymentDetailTransfer $paymentData, $idOrder)
621
    {
622
        $this->getFactory()->createPaymentManager()->updatePaymentDetail($paymentData, $idOrder);
623
    }
624
625
    /**
626
     * {@inheritDoc}
627
     *
628
     * @api
629
     *
630
     * @param \Generated\Shared\Transfer\PayoneInitPaypalExpressCheckoutRequestTransfer $requestTransfer
631
     *
632
     * @return \Generated\Shared\Transfer\PayonePaypalExpressCheckoutGenericPaymentResponseTransfer
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...PaymentResponseTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
633
     */
634
    public function initPaypalExpressCheckout(PayoneInitPaypalExpressCheckoutRequestTransfer $requestTransfer)
635
    {
636
        return $this->getFactory()->createPaymentManager()->initPaypalExpressCheckout($requestTransfer);
637
    }
638
639
    /**
640
     * {@inheritDoc}
641
     *
642
     * @api
643
     *
644
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
645
     *
646
     * @return \Generated\Shared\Transfer\PayonePaypalExpressCheckoutGenericPaymentResponseTransfer
647
     */
648
    public function getPaypalExpressCheckoutDetails(QuoteTransfer $quoteTransfer)
649
    {
650
        return $this->getFactory()->createPaymentManager()->getPaypalExpressCheckoutDetails($quoteTransfer);
651
    }
652
653
    /**
654
     * {@inheritdoc}
655
     *
656
     * @api
657
     *
658
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
659
     *
660
     * @return \Generated\Shared\Transfer\AddressCheckResponseTransfer
661
     */
662
    public function sendAddressCheckRequest(QuoteTransfer $quoteTransfer): AddressCheckResponseTransfer
663
    {
664
        return $this->getFactory()
665
            ->createRiskCheckManager()
666
            ->sendAddressCheckRequest($quoteTransfer);
667
    }
668
669
    /**
670
     * {@inheritdoc}
671
     *
672
     * @api
673
     *
674
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
675
     *
676
     * @return \Generated\Shared\Transfer\ConsumerScoreResponseTransfer
677
     */
678
    public function sendConsumerScoreRequest(QuoteTransfer $quoteTransfer): ConsumerScoreResponseTransfer
679
    {
680
        return $this->getFactory()
681
            ->createRiskCheckManager()
682
            ->sendConsumerScoreRequest($quoteTransfer);
683
    }
684
685
    /**
686
     * {@inheritdoc}
687
     *
688
     * @api
689
     *
690
     * @param \Generated\Shared\Transfer\PaymentMethodsTransfer $paymentMethodsTransfer
691
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
692
     *
693
     * @return \Generated\Shared\Transfer\PaymentMethodsTransfer
694
     */
695
    public function filterPaymentMethods(PaymentMethodsTransfer $paymentMethodsTransfer, QuoteTransfer $quoteTransfer): PaymentMethodsTransfer
696
    {
697
        return $this->getFactory()
698
            ->createPaymentMethodFilter()
699
            ->filterPaymentMethods($paymentMethodsTransfer, $quoteTransfer);
700
    }
701
702
    /**
703
     * {@inheritDoc}
704
     *
705
     * @api
706
     *
707
     * @param int $idSalesOrder
708
     * @param int $idSalesOrderItem
709
     *
710
     * @return string|null
711
     */
712
    public function findPayoneOrderItemStatus(int $idSalesOrder, int $idSalesOrderItem): ?string
713
    {
714
        return $this->getFactory()
715
            ->createPayoneOrderItemStatusFinder()
716
            ->findPayoneOrderItemStatus($idSalesOrder, $idSalesOrderItem);
717
    }
718
719
    /**
720
     * {@inheritDoc}
721
     *
722
     * @api
723
     *
724
     * @param \Generated\Shared\Transfer\PayonePartialOperationRequestTransfer $payonePartialOperationRequestTransfer
725
     *
726
     * @return \Generated\Shared\Transfer\CaptureResponseTransfer
727
     */
728
    public function executePartialCapture(
729
        PayonePartialOperationRequestTransfer $payonePartialOperationRequestTransfer
730
    ): CaptureResponseTransfer {
731
        return $this->getFactory()
732
            ->createPaymentManager()
733
            ->executePartialCapture($payonePartialOperationRequestTransfer);
734
    }
735
736
    /**
737
     * {@inheritDoc}
738
     *
739
     * @api
740
     *
741
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
742
     *
743
     * @return \Generated\Shared\Transfer\OrderTransfer
744
     */
745
    public function distributePrices(OrderTransfer $orderTransfer): OrderTransfer
746
    {
747
        return $this->getFactory()
748
            ->createPriceDistributor()
749
            ->distribute($orderTransfer);
750
    }
751
}
752