RedirectGateway   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 68
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 12
lcom 2
cbo 1
dl 0
loc 68
ccs 24
cts 24
cp 1
rs 10
c 0
b 0
f 0

12 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getDefaultParameters() 0 10 1
A getScpId() 0 4 1
A setScpId() 0 4 1
A getSiteId() 0 4 1
A setSiteId() 0 4 1
A getHmacKeyId() 0 4 1
A setHmacKeyId() 0 4 1
A getHmacKey() 0 4 1
A setHmacKey() 0 4 1
A purchase() 0 4 1
A completePurchase() 0 4 1
1
<?php
2
3
namespace Omnipay\CapitaPay360;
4
5
use Omnipay\Common\AbstractGateway;
6
use Omnipay\CapitaPay360\Message\CompletePurchaseRequest;
7
use Omnipay\CapitaPay360\Message\PurchaseRequest;
8
9
/**
10
 * CapitaPay360 Redirect Gateway
11
 */
12
class RedirectGateway extends AbstractGateway
13
{
14 1
    public function getName()
15
    {
16 1
        return 'Capita Pay360 Redirect';
17
    }
18
19 27
    public function getDefaultParameters()
20
    {
21
        return array(
22 27
            'scpId' => '',
23
            'siteId' => '',
24
            'hmacKeyId' => '',
25
            'hmacKey' => '',
26
            'testMode' => false,
27
        );
28
    }
29
30 2
    public function getScpId()
31
    {
32 2
        return $this->getParameter('scpId');
33
    }
34
35 4
    public function setScpId($value)
36
    {
37 4
        return $this->setParameter('scpId', $value);
38
    }
39
40 2
    public function getSiteId()
41
    {
42 2
        return $this->getParameter('siteId');
43
    }
44
45 4
    public function setSiteId($value)
46
    {
47 4
        return $this->setParameter('siteId', $value);
48
    }
49
50 2
    public function getHmacKeyId()
51
    {
52 2
        return $this->getParameter('hmacKeyId');
53
    }
54
55 4
    public function setHmacKeyId($value)
56
    {
57 4
        return $this->setParameter('hmacKeyId', $value);
58
    }
59
60 2
    public function getHmacKey()
61
    {
62 2
        return $this->getParameter('hmacKey');
63
    }
64
65 4
    public function setHmacKey($value)
66
    {
67 4
        return $this->setParameter('hmacKey', $value);
68
    }
69
70 2
    public function purchase(array $parameters = array())
71
    {
72 2
        return $this->createRequest('\Omnipay\CapitaPay360\Message\PurchaseRequest', $parameters);
73
    }
74
75 2
    public function completePurchase(array $parameters = array())
76
    {
77 2
        return $this->createRequest('\Omnipay\CapitaPay360\Message\CompletePurchaseRequest', $parameters);
78
    }
79
}
80