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\Payolution\Communication; |
9
|
|
|
|
10
|
|
|
use Orm\Zed\Sales\Persistence\SpySalesOrder; |
|
|
|
|
11
|
|
|
use Spryker\Zed\Kernel\Communication\AbstractCommunicationFactory; |
12
|
|
|
use SprykerEco\Zed\Payolution\Communication\Plugin\Oms\Converter\OmsEntityConverter; |
13
|
|
|
use SprykerEco\Zed\Payolution\Communication\Plugin\Oms\Converter\OmsEntityConverterInterface; |
14
|
|
|
use SprykerEco\Zed\Payolution\Communication\Table\Payments; |
15
|
|
|
use SprykerEco\Zed\Payolution\Communication\Table\RequestLog; |
16
|
|
|
use SprykerEco\Zed\Payolution\Communication\Table\StatusLog; |
17
|
|
|
use SprykerEco\Zed\Payolution\PayolutionDependencyProvider; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @method \SprykerEco\Zed\Payolution\Persistence\PayolutionQueryContainerInterface getQueryContainer() |
21
|
|
|
* @method \SprykerEco\Zed\Payolution\PayolutionConfig getConfig() |
22
|
|
|
* @method \SprykerEco\Zed\Payolution\Business\PayolutionFacadeInterface getFacade() |
23
|
|
|
*/ |
24
|
|
|
class PayolutionCommunicationFactory extends AbstractCommunicationFactory |
25
|
|
|
{ |
26
|
|
|
/** |
27
|
|
|
* @return \SprykerEco\Zed\Payolution\Communication\Table\GuiTableInterface |
28
|
|
|
*/ |
29
|
|
|
public function createPaymentsTable() |
30
|
|
|
{ |
31
|
|
|
$paymentPayolutionQuery = $this->getQueryContainer()->queryPayments(); |
32
|
|
|
|
33
|
|
|
return new Payments($paymentPayolutionQuery); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @param int $idPayment |
38
|
|
|
* |
39
|
|
|
* @return \SprykerEco\Zed\Payolution\Communication\Table\GuiTableInterface |
40
|
|
|
*/ |
41
|
|
|
public function createRequestLogTable($idPayment) |
42
|
|
|
{ |
43
|
|
|
$requestLogQuery = $this->getQueryContainer()->queryTransactionRequestLogByPaymentId($idPayment); |
44
|
|
|
|
45
|
|
|
return new RequestLog($requestLogQuery, $idPayment); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @param int $idPayment |
50
|
|
|
* |
51
|
|
|
* @return \SprykerEco\Zed\Payolution\Communication\Table\GuiTableInterface |
52
|
|
|
*/ |
53
|
|
|
public function createStatusLogTable($idPayment) |
54
|
|
|
{ |
55
|
|
|
$statusLogQuery = $this->getQueryContainer()->queryTransactionStatusLogByPaymentId($idPayment); |
56
|
|
|
|
57
|
|
|
return new StatusLog($statusLogQuery, $idPayment); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @return \SprykerEco\Zed\Payolution\Communication\Plugin\Oms\Converter\OmsEntityConverter |
62
|
|
|
*/ |
63
|
|
|
public function createOmsEntityConverter(): OmsEntityConverterInterface |
64
|
|
|
{ |
65
|
|
|
return new OmsEntityConverter($this->getSalesFacade()); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @return \SprykerEco\Zed\Payolution\Dependency\Facade\PayolutionToMailInterface |
70
|
|
|
*/ |
71
|
|
|
public function getMailFacade() |
72
|
|
|
{ |
73
|
|
|
return $this->getProvidedDependency(PayolutionDependencyProvider::FACADE_MAIL); |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @return \SprykerEco\Zed\Payolution\Dependency\Facade\PayolutionToGlossaryInterface |
78
|
|
|
*/ |
79
|
|
|
public function getGlossaryFacade() |
80
|
|
|
{ |
81
|
|
|
return $this->getProvidedDependency(PayolutionDependencyProvider::FACADE_GLOSSARY); |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @return \SprykerEco\Zed\Payolution\Dependency\Facade\PayolutionToRefundInterface |
86
|
|
|
*/ |
87
|
|
|
public function getRefundFacade() |
88
|
|
|
{ |
89
|
|
|
return $this->getProvidedDependency(PayolutionDependencyProvider::FACADE_REFUND); |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @return \SprykerEco\Zed\Payolution\Dependency\Facade\PayolutionToSalesInterface |
94
|
|
|
*/ |
95
|
|
|
public function getSalesFacade() |
96
|
|
|
{ |
97
|
|
|
return $this->getProvidedDependency(PayolutionDependencyProvider::FACADE_SALES); |
98
|
|
|
} |
99
|
|
|
} |
100
|
|
|
|
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths