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\CrefoPay\Business\Oms\Command\Builder; |
9
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\CrefoPayApiFinishRequestTransfer; |
|
|
|
|
11
|
|
|
use Generated\Shared\Transfer\CrefoPayApiRequestTransfer; |
|
|
|
|
12
|
|
|
use Generated\Shared\Transfer\CrefoPayOmsCommandTransfer; |
|
|
|
|
13
|
|
|
use SprykerEco\Zed\CrefoPay\CrefoPayConfig; |
14
|
|
|
|
15
|
|
|
class FinishOmsCommandRequestBuilder implements CrefoPayOmsCommandRequestBuilderInterface |
16
|
|
|
{ |
17
|
|
|
/** |
18
|
|
|
* @var \SprykerEco\Zed\CrefoPay\CrefoPayConfig |
19
|
|
|
*/ |
20
|
|
|
protected $config; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @param \SprykerEco\Zed\CrefoPay\CrefoPayConfig $config |
24
|
|
|
*/ |
25
|
|
|
public function __construct(CrefoPayConfig $config) |
26
|
|
|
{ |
27
|
|
|
$this->config = $config; |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @param \Generated\Shared\Transfer\CrefoPayOmsCommandTransfer $crefoPayOmsCommandTransfer |
32
|
|
|
* |
33
|
|
|
* @return \Generated\Shared\Transfer\CrefoPayOmsCommandTransfer |
34
|
|
|
*/ |
35
|
|
|
public function buildRequestTransfer(CrefoPayOmsCommandTransfer $crefoPayOmsCommandTransfer): CrefoPayOmsCommandTransfer |
36
|
|
|
{ |
37
|
|
|
$requestTransfer = (new CrefoPayApiRequestTransfer()) |
38
|
|
|
->setFinishRequest($this->createFinishRequestTransfer($crefoPayOmsCommandTransfer)); |
39
|
|
|
|
40
|
|
|
return $crefoPayOmsCommandTransfer |
41
|
|
|
->setRequest($requestTransfer); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @param \Generated\Shared\Transfer\CrefoPayOmsCommandTransfer $crefoPayOmsCommandTransfer |
46
|
|
|
* |
47
|
|
|
* @return \Generated\Shared\Transfer\CrefoPayApiFinishRequestTransfer |
48
|
|
|
*/ |
49
|
|
|
protected function createFinishRequestTransfer(CrefoPayOmsCommandTransfer $crefoPayOmsCommandTransfer): CrefoPayApiFinishRequestTransfer |
50
|
|
|
{ |
51
|
|
|
return (new CrefoPayApiFinishRequestTransfer()) |
52
|
|
|
->setMerchantID($this->config->getMerchantId()) |
53
|
|
|
->setStoreID($this->config->getStoreId()) |
54
|
|
|
->setOrderID($crefoPayOmsCommandTransfer->getPaymentCrefoPay()->getCrefoPayOrderId()); |
55
|
|
|
} |
56
|
|
|
} |
57
|
|
|
|
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