PurchaseRequest::getAuthorizeResponse()   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 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace ByTIC\Omnipay\PlatiOnline\Message;
4
5
use Omnipay\Common\Message\AbstractRequest as CommonAbstractRequest;
6
7
/**
8
 * Class PurchaseRequest
9
 * @package ByTIC\Omnipay\PlatiOnline\Message
10
 *
11
 * @method PurchaseResponse send()
12
 */
13
class PurchaseRequest extends CommonAbstractRequest
14
{
15
    use \ByTIC\Omnipay\Common\Message\Traits\ParametersTrait;
16
    use \ByTIC\Omnipay\Common\Message\Traits\HasLanguageRequestTrait;
17
    use \ByTIC\Omnipay\Common\Message\Traits\SendDataRequestTrait;
18
19
    /**
20
     * @inheritDoc
21
     */
22
    public function getData()
23
    {
24
        return [
25
            'redirectUrl' => $this->getAuthorizeResponse()->getRedirectUrl()
26
        ];
27
    }
28
29
    /**
30
     * @param AuthorizeResponse $response
31
     */
32
    public function setAuthorizeResponse($response)
33
    {
34
        $this->setParameter('authorizeResponse', $response);
35
    }
36
37
    /**
38
     * @return AuthorizeResponse
39
     */
40
    public function getAuthorizeResponse()
41
    {
42
        return $this->getParameter('authorizeResponse');
43
    }
44
}
45