AuthorizeResponse::getMessage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace ByTIC\Omnipay\PlatiOnline\Message;
4
5
/**
6
 * Class AuthorizeResponse
7
 * @package ByTIC\Omnipay\PlatiOnline\Message
8
 */
9
class AuthorizeResponse extends AbstractResponse
10
{
11
    /**
12
     * @inheritDoc
13
     */
14
    public function getRedirectUrl()
15
    {
16
        return (string) $this->data->po_redirect_url;
17
    }
18
19
20
    /**
21
     * @inheritdoc
22
     */
23
    public function isSuccessful()
24
    {
25
        return $this->getCode() != 1;
26
    }
27
28
    /**
29
     * @inheritDoc
30
     */
31
    public function getMessage()
32
    {
33
        return (string) $this->data->po_error_reason;
34
    }
35
36
    /**
37
     * @inheritDoc
38
     */
39
    public function getCode()
40
    {
41
        return (string) $this->data->po_error_code;
42
    }
43
44
    /**
45
     * @inheritDoc
46
     */
47
    public function getTransactionReference()
48
    {
49
        return (string) $this->data->x_trans_id;
50
    }
51
}
52