1 | <?php |
||
2 | /** |
||
3 | * Copyright © Wirecard Brasil. All rights reserved. |
||
4 | * |
||
5 | * @author Bruno Elisei <[email protected]> |
||
6 | * See COPYING.txt for license details. |
||
7 | */ |
||
8 | |||
9 | namespace Moip\Magento2\Gateway\Request; |
||
10 | |||
11 | use Magento\Payment\Gateway\ConfigInterface; |
||
0 ignored issues
–
show
|
|||
12 | use Magento\Payment\Gateway\Data\PaymentDataObjectInterface; |
||
0 ignored issues
–
show
The type
Magento\Payment\Gateway\...mentDataObjectInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
13 | use Magento\Payment\Gateway\Request\BuilderInterface; |
||
0 ignored issues
–
show
The type
Magento\Payment\Gateway\Request\BuilderInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
14 | |||
15 | /** |
||
16 | * Class FetchTransactionInfoRequest - Transaction query data structure. |
||
17 | */ |
||
18 | class FetchTransactionInfoRequest implements BuilderInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var Moip Order Id |
||
22 | */ |
||
23 | const MOIP_ORDER_ID = 'moip_order_id'; |
||
24 | |||
25 | /** |
||
26 | * @var ConfigInterface |
||
27 | */ |
||
28 | private $config; |
||
29 | |||
30 | /** |
||
31 | * @param ConfigInterface $config |
||
32 | */ |
||
33 | public function __construct( |
||
34 | ConfigInterface $config |
||
35 | ) { |
||
36 | $this->config = $config; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function build(array $buildSubject) |
||
43 | { |
||
44 | if (!isset($buildSubject['payment']) |
||
45 | || !$buildSubject['payment'] instanceof PaymentDataObjectInterface |
||
46 | ) { |
||
47 | throw new \InvalidArgumentException('Payment data object should be provided'); |
||
48 | } |
||
49 | |||
50 | $paymentDO = $buildSubject['payment']; |
||
51 | |||
52 | $payment = $paymentDO->getPayment(); |
||
53 | |||
54 | $order = $payment->getOrder(); |
||
55 | |||
56 | return [ |
||
57 | self::MOIP_ORDER_ID => $order->getExtOrderId(), |
||
58 | ]; |
||
59 | } |
||
60 | } |
||
61 |
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