HostedGateway::setGatewayId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Omnipay\Paystation;
4
5
use Omnipay\Common\AbstractGateway;
6
7
class HostedGateway extends AbstractGateway
8
{
9
    
10 2
    public function getName()
11
    {
12 2
        return 'Paystation';
13
    }
14
15 31
    public function getDefaultParameters()
16
    {
17
        return array(
18 31
            'paystationId' => '',
19
            'gatewayId' => ''
20
        );
21
    }
22
23 2
    public function getPaystationId()
24
    {
25 2
        return $this->getParameter('paystationId');
26
    }
27
28 31
    public function setPaystationId($value)
29
    {
30 31
        return $this->setParameter('paystationId', $value);
31
    }
32
33 2
    public function getGatewayId()
34
    {
35 2
        return $this->getParameter('gatewayId');
36
    }
37
38 31
    public function setGatewayId($value)
39
    {
40 31
        return $this->setParameter('gatewayId', $value);
41
    }
42
43 1
    public function getHmacKey()
44
    {
45 1
        return $this->getParameter('hmacKey');
46
    }
47
48 2
    public function setHmacKey($value)
49
    {
50 2
        return $this->setParameter('hmacKey', $value);
51
    }
52
53 7
    public function purchase(array $parameters = array())
54
    {
55 7
        return $this->createRequest('\Omnipay\Paystation\Message\PurchaseRequest', $parameters);
56
    }
57
58 9
    public function completePurchase(array $parameters = array())
59
    {
60 9
        return $this->createRequest('\Omnipay\Paystation\Message\CompletePurchaseRequest', $parameters);
61
    }
62
63
    public function acceptNotification()
64
    {
65
        return $this->createRequest('\Omnipay\Paystation\Message\WebhookNotification', array());
66
    }
67
}
68