AuthorizeResponse   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 41
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getTransactionReference() 0 3 1
A isSuccessful() 0 3 1
A getCode() 0 3 1
A getMessage() 0 3 1
A getRedirectUrl() 0 3 1
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