Transaction   A
last analyzed

Complexity

Total Complexity 16

Size/Duplication

Total Lines 248
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 16
lcom 0
cbo 0
dl 0
loc 248
rs 10
c 0
b 0
f 0

16 Methods

Rating   Name   Duplication   Size   Complexity  
A setAmount() 0 6 1
A getAmount() 0 4 1
A setEmail() 0 6 1
A getEmail() 0 4 1
A setFirstName() 0 6 1
A getFirstName() 0 4 1
A setLastName() 0 6 1
A getLastName() 0 4 1
A setCustomer() 0 6 1
A getCustomer() 0 4 1
A setOrder() 0 6 1
A getOrder() 0 4 1
A setCustomData() 0 6 1
A getCustomData() 0 4 1
A setOrigin() 0 6 1
A getOrigin() 0 4 1
1
<?php
2
3
namespace Alcalyn\PayplugBundle\Model;
4
5
/**
6
 * Transaction
7
 * 
8
 * Superclass containing fields which appear both in Payment and IPN classes.
9
 */
10
abstract class Transaction
11
{
12
    /**
13
     * REQUIRED
14
     * 
15
     * Transaction amount, in cents (such as 4207 for 42,07€).
16
     * 
17
     * @var integer
18
     */
19
    private $amount;
20
21
    /**
22
     * The customer’s email address, either provided when creating the payment URL
23
     * or entered manually on the payment page by the customer.
24
     * 
25
     * @var string
26
     */
27
    private $email;
28
29
    /**
30
     * The customer’s first name, either provided when creating the payment URL
31
     * or entered manually on the payment page by the customer.
32
     * 
33
     * @var string
34
     */
35
    private $firstName;
36
37
    /**
38
     * The customer’s last name, either provided when creating the payment URL
39
     * or entered manually on the payment page by the customer.
40
     * 
41
     * @var string
42
     */
43
    private $lastName;
44
45
    /**
46
     * Customer ID provided when creating the payment URL.
47
     * 
48
     * @var string
49
     */
50
    private $customer;
51
52
    /**
53
     * Order ID provided when creating the payment URL.
54
     * 
55
     * @var string
56
     */
57
    private $order;
58
59
    /**
60
     * Custom data provided when creating the payment URL.
61
     * 
62
     * @var string
63
     */
64
    private $customData;
65
66
    /**
67
     * Information about your website version (e.g., ‘My Website 1.2 payplug_php0.9 PHP 5.3’),
68
     * provided when creating the payment URL, with additional data sent by the library itself.
69
     * 
70
     * @var string
71
     */
72
    private $origin;
73
    
74
    /**
75
     * Set amount
76
     *
77
     * @param integer $amount
78
     * @return Transaction
79
     */
80
    public function setAmount($amount)
81
    {
82
        $this->amount = $amount;
83
84
        return $this;
85
    }
86
87
    /**
88
     * Get amount
89
     *
90
     * @return integer 
91
     */
92
    public function getAmount()
93
    {
94
        return $this->amount;
95
    }
96
97
    /**
98
     * Set email
99
     *
100
     * @param string $email
101
     * @return Transaction
102
     */
103
    public function setEmail($email)
104
    {
105
        $this->email = $email;
106
107
        return $this;
108
    }
109
110
    /**
111
     * Get email
112
     *
113
     * @return string 
114
     */
115
    public function getEmail()
116
    {
117
        return $this->email;
118
    }
119
120
    /**
121
     * Set firstName
122
     *
123
     * @param string $firstName
124
     * @return Transaction
125
     */
126
    public function setFirstName($firstName)
127
    {
128
        $this->firstName = $firstName;
129
130
        return $this;
131
    }
132
133
    /**
134
     * Get firstName
135
     *
136
     * @return string 
137
     */
138
    public function getFirstName()
139
    {
140
        return $this->firstName;
141
    }
142
143
    /**
144
     * Set lastName
145
     *
146
     * @param string $lastName
147
     * @return Transaction
148
     */
149
    public function setLastName($lastName)
150
    {
151
        $this->lastName = $lastName;
152
153
        return $this;
154
    }
155
156
    /**
157
     * Get lastName
158
     *
159
     * @return string 
160
     */
161
    public function getLastName()
162
    {
163
        return $this->lastName;
164
    }
165
166
    /**
167
     * Set customer
168
     *
169
     * @param string $customer
170
     * @return Transaction
171
     */
172
    public function setCustomer($customer)
173
    {
174
        $this->customer = $customer;
175
176
        return $this;
177
    }
178
179
    /**
180
     * Get customer
181
     *
182
     * @return string 
183
     */
184
    public function getCustomer()
185
    {
186
        return $this->customer;
187
    }
188
189
    /**
190
     * Set order
191
     *
192
     * @param string $order
193
     * @return Transaction
194
     */
195
    public function setOrder($order)
196
    {
197
        $this->order = $order;
198
199
        return $this;
200
    }
201
202
    /**
203
     * Get order
204
     *
205
     * @return string 
206
     */
207
    public function getOrder()
208
    {
209
        return $this->order;
210
    }
211
212
    /**
213
     * Set customData
214
     *
215
     * @param string $customData
216
     * @return Transaction
217
     */
218
    public function setCustomData($customData)
219
    {
220
        $this->customData = $customData;
221
222
        return $this;
223
    }
224
225
    /**
226
     * Get customData
227
     *
228
     * @return string 
229
     */
230
    public function getCustomData()
231
    {
232
        return $this->customData;
233
    }
234
235
    /**
236
     * Set origin
237
     *
238
     * @param string $origin
239
     * @return Transaction
240
     */
241
    public function setOrigin($origin)
242
    {
243
        $this->origin = $origin;
244
245
        return $this;
246
    }
247
248
    /**
249
     * Get origin
250
     *
251
     * @return string 
252
     */
253
    public function getOrigin()
254
    {
255
        return $this->origin;
256
    }
257
}
258