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\Communication; |
9
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\PayoneStandardParameterTransfer; |
|
|
|
|
11
|
|
|
use Spryker\Zed\Kernel\Communication\AbstractCommunicationFactory; |
12
|
|
|
use SprykerEco\Zed\Payone\Business\Key\HmacGeneratorInterface; |
13
|
|
|
use SprykerEco\Zed\Payone\Business\Key\UrlHmacGenerator; |
14
|
|
|
use SprykerEco\Zed\Payone\Communication\Model\ParametersReader; |
15
|
|
|
use SprykerEco\Zed\Payone\Communication\Model\ParametersReaderInterface; |
16
|
|
|
use SprykerEco\Zed\Payone\Dependency\Facade\PayoneToCalculationInterface; |
17
|
|
|
use SprykerEco\Zed\Payone\Dependency\Facade\PayoneToOmsInterface; |
18
|
|
|
use SprykerEco\Zed\Payone\Dependency\Facade\PayoneToRefundInterface; |
19
|
|
|
use SprykerEco\Zed\Payone\Dependency\Facade\PayoneToSalesInterface; |
20
|
|
|
use SprykerEco\Zed\Payone\Dependency\Facade\PayoneToStoreFacadeBridge; |
21
|
|
|
use SprykerEco\Zed\Payone\PayoneDependencyProvider; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @method \SprykerEco\Zed\Payone\PayoneConfig getConfig() |
25
|
|
|
* @method \SprykerEco\Zed\Payone\Persistence\PayoneQueryContainerInterface getQueryContainer() |
26
|
|
|
* @method \SprykerEco\Zed\Payone\Persistence\PayoneRepositoryInterface getRepository() |
27
|
|
|
* @method \SprykerEco\Zed\Payone\Persistence\PayoneEntityManagerInterface getEntityManager() |
28
|
|
|
* @method \SprykerEco\Zed\Payone\Business\PayoneFacadeInterface getFacade() |
29
|
|
|
*/ |
30
|
|
|
class PayoneCommunicationFactory extends AbstractCommunicationFactory |
31
|
|
|
{ |
32
|
|
|
/** |
33
|
|
|
* @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToOmsInterface |
34
|
|
|
*/ |
35
|
|
|
public function getOmsFacade(): PayoneToOmsInterface |
36
|
|
|
{ |
37
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_OMS); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToSalesInterface |
42
|
|
|
*/ |
43
|
|
|
public function getSalesFacade(): PayoneToSalesInterface |
44
|
|
|
{ |
45
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_SALES); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToRefundInterface |
50
|
|
|
*/ |
51
|
|
|
public function getRefundFacade(): PayoneToRefundInterface |
52
|
|
|
{ |
53
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_REFUND); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToCalculationInterface |
58
|
|
|
*/ |
59
|
|
|
public function getCalculationFacade(): PayoneToCalculationInterface |
60
|
|
|
{ |
61
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_CALCULATION); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToStoreFacadeBridge |
66
|
|
|
*/ |
67
|
|
|
public function getStoreFacade(): PayoneToStoreFacadeBridge |
68
|
|
|
{ |
69
|
|
|
return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_STORE); |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @return \SprykerEco\Zed\Payone\Business\Key\HmacGeneratorInterface |
74
|
|
|
*/ |
75
|
|
|
public function createUrlHmacGenerator(): HmacGeneratorInterface |
76
|
|
|
{ |
77
|
|
|
return new UrlHmacGenerator(); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @return \SprykerEco\Zed\Payone\Communication\Model\ParametersReaderInterface |
82
|
|
|
*/ |
83
|
|
|
public function createParametersReader(): ParametersReaderInterface |
84
|
|
|
{ |
85
|
|
|
return new ParametersReader( |
86
|
|
|
$this->getStoreFacade(), |
87
|
|
|
$this->getConfig(), |
88
|
|
|
); |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return \Generated\Shared\Transfer\PayoneStandardParameterTransfer |
93
|
|
|
*/ |
94
|
|
|
public function getStandardParameter(): PayoneStandardParameterTransfer |
95
|
|
|
{ |
96
|
|
|
return $this->createParametersReader()->getRequestStandardParameter(); |
97
|
|
|
} |
98
|
|
|
} |
99
|
|
|
|
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