Completed
Push — master ( 24e2fb...716e2b )
by Oleksandr
16s queued 14s
created

ExternalEasyCreditPaymentResponseBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A buildExternalResponseTransfer() 0 6 1
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\Heidelpay\Business\Payment\Request;
9
10
use Generated\Shared\Transfer\HeidelpayExternalPaymentResponseTransfer;
1 ignored issue
show
Bug introduced by
The type Generated\Shared\Transfe...PaymentResponseTransfer 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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use SprykerEco\Zed\Heidelpay\Business\Payment\PaymentReaderInterface;
12
13
class ExternalEasyCreditPaymentResponseBuilder implements ExternalEasyCreditPaymentResponseBuilderInterface
14
{
15
    public const REQUEST_PARAM_ORDER_ID = 'IDENTIFICATION_TRANSACTIONID';
16
17
    /**
18
     * @var \SprykerEco\Zed\Heidelpay\Business\Payment\PaymentReaderInterface
19
     */
20
    protected $paymentReader;
21
22
    /**
23
     * @param \SprykerEco\Zed\Heidelpay\Business\Payment\PaymentReaderInterface $paymentReader
24
     */
25
    public function __construct(PaymentReaderInterface $paymentReader)
26
    {
27
        $this->paymentReader = $paymentReader;
28
    }
29
30
    /**
31
     * @param array $postRequestParams
32
     *
33
     * @return \Generated\Shared\Transfer\HeidelpayExternalPaymentResponseTransfer
34
     */
35
    public function buildExternalResponseTransfer(array $postRequestParams)
36
    {
37
        $externalResponseTransfer = (new HeidelpayExternalPaymentResponseTransfer())
38
            ->setBody($postRequestParams);
39
40
        return $externalResponseTransfer;
41
    }
42
}
43