Completed
Push — main ( 7136de...6d50be )
by Leonard
03:35
created

AbstractRequest::setReceiver()   A

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\YooMoney\Message;
4
5
use Omnipay\Common\Message\AbstractRequest as OmnipayRequest;
6
7
abstract class AbstractRequest extends OmnipayRequest
8
{
9
    public $endpoint = 'https://yoomoney.ru/quickpay/confirm.xml';
10
11 3
    public function getEndpoint()
12
    {
13 3
        return $this->endpoint;
14
    }
15
16 24
    public function setSecret($value)
17
    {
18 24
        return $this->setParameter('secret', $value);
19
    }
20
21 6
    public function getSecret()
22
    {
23 6
        return $this->getParameter('secret');
24
    }
25
26 24
    public function setReceiver($value)
27
    {
28 24
        return $this->setParameter('receiver', $value);
29
    }
30
31 12
    public function getReceiver()
32
    {
33 12
        return $this->getParameter('receiver');
34
    }
35
36
    /**
37
     * @param string $value shop — для универсальной формы, small — для кнопки, donate — для «благотворительной» формы
38
     *
39
     * @return AbstractRequest
40
     */
41 24
    public function setQuickpayForm($value)
42
    {
43 24
        return $this->setParameter('quickpay_form', $value);
44
    }
45
46 12
    public function getQuickpayForm()
47
    {
48 12
        return $this->getParameter('quickpay_form');
49
    }
50
51
    /**
52
     * @param string $value PC - оплата из кошелька ЮMoney, AC - с банковской карты, MC - с баланса мобильного
53
     *
54
     * @return AbstractRequest
55
     */
56 24
    public function setPaymentType($value)
57
    {
58 24
        return $this->setParameter('payment_type', $value);
59
    }
60
61 12
    public function getPaymentType()
62
    {
63 12
        return $this->getParameter('payment_type');
64
    }
65
66 18
    public function setSuccessUrl($value)
67
    {
68 18
        return $this->setParameter('success_url', $value);
69
    }
70
71
    public function setReturnUrl($value)
72
    {
73
        return $this->setParameter('success_url', $value);
74
    }
75
76 12
    public function getSuccessUrl()
77
    {
78 12
        return $this->getParameter('success_url');
79
    }
80
81 24
    public function setNeedFio($value)
82
    {
83 24
        return $this->setParameter('need_fio', $value);
84
    }
85
86 12
    public function getNeedFio()
87
    {
88 12
        return $this->getParameter('need_fio');
89
    }
90
91 24
    public function setNeedEmail($value)
92
    {
93 24
        return $this->setParameter('need_email', $value);
94
    }
95
96 12
    public function getNeedEmail()
97
    {
98 12
        return $this->getParameter('need_email');
99
    }
100
101 24
    public function setNeedPhone($value)
102
    {
103 24
        return $this->setParameter('need_phone', $value);
104
    }
105
106 12
    public function getNeedPhone()
107
    {
108 12
        return $this->getParameter('need_phone');
109
    }
110
111 24
    public function setNeedAddress($value)
112
    {
113 24
        return $this->setParameter('need_address', $value);
114
    }
115
116 12
    public function getNeedAddress()
117
    {
118 12
        return $this->getParameter('need_address');
119
    }
120
121 18
    public function setTargets($value)
122
    {
123 18
        return $this->setParameter('targets', $value);
124
    }
125
126 12
    public function getTargets()
127
    {
128 12
        return $this->getParameter('targets');
129
    }
130
131
}
132