IframeGateway   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 112
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 12
dl 0
loc 112
rs 10
c 0
b 0
f 0

12 Methods

Rating   Name   Duplication   Size   Complexity  
A status() 0 3 1
A acceptNotification() 0 3 1
A extendedStatus() 0 3 1
A setUser() 0 3 1
A getTerminal() 0 3 1
A getName() 0 3 1
A authorize() 0 3 1
A getPassword() 0 3 1
A getDefaultParameters() 0 7 1
A setPassword() 0 3 1
A setTerminal() 0 3 1
A getUser() 0 3 1
1
<?php
2
namespace Omnipay\Pelecard;
3
4
use Omnipay\Common\AbstractGateway;
5
6
/**
7
 * Pelecard Gateway
8
 */
9
class IframeGateway extends AbstractGateway
10
{
11
12
    public function getName()
13
    {
14
        return 'Pelecard Iframe Gateway';
15
    }
16
    
17
    public function getDefaultParameters()
18
    {
19
        return array(
20
            'user' => '',
21
            'password' => '',
22
            'terminal' => '',
23
            'testMode' => false
24
        );
25
    }
26
27
    /**
28
     * Get user
29
     *
30
     * Use the User assigned by Pelecard.
31
     *
32
     * @return string
33
     */
34
    public function getUser()
35
    {
36
        return $this->getParameter('user');
37
    }
38
39
    /**
40
     * Set user
41
     *
42
     * Use the User assigned by Pelecard.
43
     *
44
     * @param string $value
45
     */
46
    public function setUser($value)
47
    {
48
        return $this->setParameter('user', $value);
49
    }
50
51
    /**
52
     * Get password
53
     *
54
     * Use the Password assigned by Pelecard.
55
     *
56
     * @return string
57
     */
58
    public function getPassword()
59
    {
60
        return $this->getParameter('password');
61
    }
62
63
    /**
64
     * Set password
65
     *
66
     * Use the Password assigned by Pelecard.
67
     *
68
     * @param string $value
69
     */
70
    public function setPassword($value)
71
    {
72
        return $this->setParameter('password', $value);
73
    }
74
75
    /**
76
     * Get terminal
77
     *
78
     * Use the terminal assigned by Pelecard.
79
     *
80
     * @return string
81
     */
82
    public function getTerminal()
83
    {
84
        return $this->getParameter('terminal');
85
    }
86
87
    /**
88
     * Set terminal
89
     *
90
     * Use the terminal assigned by Pelecard.
91
     *
92
     * @param string $value
93
     */
94
    public function setTerminal($value)
95
    {
96
        return $this->setParameter('terminal', $value);
97
    }
98
99
    /**
100
     *
101
     * @return Message\AuthorizeRequest
102
     */
103
    public function authorize(array $parameters = array())
104
    {
105
        return $this->createRequest('\Omnipay\Pelecard\Message\AuthorizeRequest', $parameters);
106
    }
107
    
108
    public function status(array $parameters = array())
109
    {
110
        return $this->createRequest('\Omnipay\Pelecard\Message\StatusRequest', $parameters);
111
    }
112
113
    public function acceptNotification(array $parameters = array())
114
    {
115
        return $this->createRequest('\Omnipay\Pelecard\Message\StatusRequest', $parameters);
116
    }
117
    
118
    public function extendedStatus(array $parameters = array())
119
    {
120
        return $this->createRequest('\Omnipay\Pelecard\Message\StatusRequest', $parameters);
121
    }
122
}
123