1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of PHP CS Fixer. |
5
|
|
|
* |
6
|
|
|
* (c) Fabien Potencier <[email protected]> |
7
|
|
|
* Dariusz Rumiński <[email protected]> |
8
|
|
|
* |
9
|
|
|
* This source file is subject to the MIT license that is bundled |
10
|
|
|
* with this source code in the file LICENSE. |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
namespace Etrias\PaazlConnector\Service; |
14
|
|
|
|
15
|
|
|
use Etrias\PaazlConnector\Processor\Processor; |
16
|
|
|
use Etrias\PaazlConnector\ServiceType\Service as GeneralServiceType; |
17
|
|
|
use Etrias\PaazlConnector\StructType\BaseCheckoutRequestType; |
18
|
|
|
use Etrias\PaazlConnector\StructType\CheckoutResponse; |
19
|
|
|
|
20
|
|
|
class CheckoutService |
21
|
|
|
{ |
22
|
|
|
use Processor; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var SecurityServiceInterface |
26
|
|
|
*/ |
27
|
|
|
protected $securityService; |
28
|
|
|
/** |
29
|
|
|
* @var GeneralServiceType |
30
|
|
|
*/ |
31
|
|
|
protected $generalServiceType; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* DocumentService constructor. |
35
|
|
|
* |
36
|
|
|
* @param GeneralServiceType $generalServiceType |
37
|
|
|
* @param SecurityServiceInterface $securityService |
38
|
|
|
*/ |
39
|
|
|
public function __construct(GeneralServiceType $generalServiceType, SecurityServiceInterface $securityService) |
40
|
|
|
{ |
41
|
|
|
$this->securityService = $securityService; |
42
|
|
|
$this->generalServiceType = $generalServiceType; |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @param $orderReference |
47
|
|
|
* @param null $targetWebShop |
48
|
|
|
* |
49
|
|
|
* @return CheckoutResponse |
50
|
|
|
*/ |
51
|
|
|
public function getCheckoutUrl($orderReference, $targetWebShop = null) |
52
|
|
|
{ |
53
|
|
|
$request = new BaseCheckoutRequestType( |
54
|
|
|
$this->securityService->getHash($orderReference), |
55
|
|
|
$this->generalServiceType->getWebShopId(), |
56
|
|
|
$targetWebShop, |
57
|
|
|
$orderReference |
58
|
|
|
); |
59
|
|
|
|
60
|
|
|
$response = $this->generalServiceType->checkout($request); |
61
|
|
|
|
62
|
|
|
return $this->processResponse($response, $this->generalServiceType); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @param $orderReference |
67
|
|
|
* @param null $targetWebShop |
68
|
|
|
* |
69
|
|
|
* @return CheckoutStatusResponse |
|
|
|
|
70
|
|
|
*/ |
71
|
|
|
public function getCheckoutStatus($orderReference, $targetWebShop = null) |
72
|
|
|
{ |
73
|
|
|
$request = new BaseCheckoutRequestType( |
74
|
|
|
$this->securityService->getHash($orderReference), |
75
|
|
|
$this->generalServiceType->getWebShopId(), |
76
|
|
|
$targetWebShop, |
77
|
|
|
$orderReference |
78
|
|
|
); |
79
|
|
|
|
80
|
|
|
$response = $this->generalServiceType->checkoutStatus($request); |
81
|
|
|
|
82
|
|
|
return $this->processResponse($response, $this->generalServiceType); |
|
|
|
|
83
|
|
|
} |
84
|
|
|
} |
85
|
|
|
|
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