__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 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;
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