Completed
Push — master ( b80522...d46641 )
by Dmitry
04:54
created

Gateway::getSecretKey2()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * RoboKassa driver for Omnipay PHP payment library.
4
 *
5
 * @link      https://github.com/hiqdev/omnipay-robokassa
6
 * @package   omnipay-robokassa
7
 * @license   MIT
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace Omnipay\RoboKassa;
12
13
use Omnipay\Common\AbstractGateway;
14
15
/**
16
 * Gateway for ePayService.
17
 */
18
class Gateway extends AbstractGateway
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function getName()
24
    {
25
        return 'RoboKassa';
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function getDefaultParameters()
32
    {
33
        return [
34
            'purse' => '',
35
            'secretKey'     => '',
36
            'secretKey2'    => '',
37
            'testMode'      => false,
38
        ];
39
    }
40
41
    /**
42
     * Get the unified purse.
43
     *
44
     * @return string merchant purse
45
     */
46
    public function getPurse()
47
    {
48
        return $this->getParameter('purse');
49
    }
50
51
    /**
52
     * Set the unified purse.
53
     *
54
     * @param string $purse merchant purse
0 ignored issues
show
Bug introduced by Yurii Myronchuk
There is no parameter named $purse. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
55
     *
56
     * @return self
57
     */
58
    public function setPurse($value)
59
    {
60
        return $this->setParameter('purse', $value);
61
    }
62
63
    /**
64
     * Get the unified secret key.
65
     *
66
     * @return string secret key
67
     */
68
    public function getSecretKey()
69
    {
70
        return $this->getParameter('secretKey');
71
    }
72
73
    /**
74
     * Set the unified secret key.
75
     *
76
     * @param string $value secret key
77
     *
78
     * @return self
79
     */
80
    public function setSecretKey($value)
81
    {
82
        return $this->setParameter('secretKey', $value);
83
    }
84
85
    /**
86
     * Get the secret key for notification signing.
87
     *
88
     * @return string secret key
89
     */
90
    public function getSecretKey2()
91
    {
92
        return $this->getParameter('secretKey2');
93
    }
94
95
    /**
96
     * Set the secret key for notification signing.
97
     *
98
     * @param string $value secret key
99
     *
100
     * @return self
101
     */
102
    public function setSecretKey2($value)
103
    {
104
        return $this->setParameter('secretKey2', $value);
105
    }
106
107
    /**
108
     * @param array $parameters
109
     *
110
     * @return \Omnipay\ePayService\Message\PurchaseRequest
111
     */
112
    public function purchase(array $parameters = [])
113
    {
114
        return $this->createRequest('\Omnipay\RoboKassa\Message\PurchaseRequest', $parameters);
115
    }
116
117
    /**
118
     * @param array $parameters
119
     *
120
     * @return \Omnipay\ePayService\Message\CompletePurchaseRequest
121
     */
122
    public function completePurchase(array $parameters = [])
123
    {
124
        return $this->createRequest('\Omnipay\RoboKassa\Message\CompletePurchaseRequest', $parameters);
125
    }
126
}
127