1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Omnipay\Redsys\Message; |
4
|
|
|
|
5
|
|
|
use DateTime; |
6
|
|
|
use Omnipay\Common\Message\AbstractRequest; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Redsys Purchase Request |
10
|
|
|
*/ |
11
|
|
|
class PurchaseRequest extends AbstractRequest |
12
|
|
|
{ |
13
|
|
|
/** @var string */ |
14
|
|
|
protected $liveEndpoint = 'https://sis.redsys.es/sis/realizarPago'; |
15
|
|
|
/** @var string */ |
16
|
|
|
protected $testEndpoint = 'https://sis-t.redsys.es:25443/sis/realizarPago'; |
17
|
|
|
/** @var array */ |
18
|
|
|
protected static $consumerLanguages = array( |
19
|
|
|
'es' => '001', // Spanish |
20
|
|
|
'en' => '002', // English |
21
|
|
|
'ca' => '003', // Catalan - same as Valencian (010) |
22
|
|
|
'fr' => '004', // French |
23
|
|
|
'de' => '005', // German |
24
|
|
|
'nl' => '006', // Dutch |
25
|
|
|
'it' => '007', // Italian |
26
|
|
|
'sv' => '008', // Swedish |
27
|
|
|
'pt' => '009', // Portuguese |
28
|
|
|
'pl' => '011', // Polish |
29
|
|
|
'gl' => '012', // Galician |
30
|
|
|
'eu' => '013', // Basque |
31
|
|
|
); |
32
|
|
|
|
33
|
|
|
/** @var stirng 250x400 */ |
34
|
|
|
const CHALLENGE_WINDOW_SIZE_250_400 = "01"; |
35
|
|
|
/** @var stirng 390x400 */ |
36
|
|
|
const CHALLENGE_WINDOW_SIZE_390_400 = "02"; |
37
|
|
|
/** @var stirng 500x600 */ |
38
|
|
|
const CHALLENGE_WINDOW_SIZE_500_600 = "03"; |
39
|
|
|
/** @var stirng 600x400 */ |
40
|
|
|
const CHALLENGE_WINDOW_SIZE_600_400 = "04"; |
41
|
|
|
/** @var stirng Fullscreen window (default) */ |
42
|
|
|
const CHALLENGE_WINDOW_SIZE_FULLSCREEN = "05"; |
43
|
|
|
|
44
|
|
|
/** @var string No 3DS Requestor authentication occurred (i.e. cardholder logged in as guest) */ |
45
|
|
|
const ACCOUNT_AUTHENTICATION_METHOD_NONE = "01"; |
46
|
|
|
/** @var string Login to the cardholder account at the 3DS Requestor system using 3DS Requestor's own credentials */ |
47
|
|
|
const ACCOUNT_AUTHENTICATION_METHOD_OWN_CREDENTIALS = "02"; |
48
|
|
|
/** @var string Login to the cardholder account at the 3DS Requestor system using federated ID */ |
49
|
|
|
const ACCOUNT_AUTHENTICATION_METHOD_FEDERATED_ID = "03"; |
50
|
|
|
/** @var string Login to the cardholder account at the 3DS Requestor system using issuer credentials */ |
51
|
|
|
const ACCOUNT_AUTHENTICATION_METHOD_ISSUER_CREDENTIALS = "04"; |
52
|
|
|
/** @var string Login to the cardholder account at the 3DS Requestor system using third-party authentication */ |
53
|
|
|
const ACCOUNT_AUTHENTICATION_METHOD_THIRD_PARTY_AUTHENTICATION = "05"; |
54
|
|
|
/** @var string Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator */ |
55
|
|
|
const ACCOUNT_AUTHENTICATION_METHOD_FIDO = "06"; |
56
|
|
|
|
57
|
|
|
/** @var string No account (guest check-out) */ |
58
|
|
|
const CUSTOMER_ACCOUNT_CREATED_NONE = "01"; |
59
|
|
|
/** @var string Created during this transaction */ |
60
|
|
|
const CUSTOMER_ACCOUNT_CREATED_THIS_TRANSACTION = "02"; |
61
|
|
|
/** @var string Less than 30 days */ |
62
|
|
|
const CUSTOMER_ACCOUNT_CREATED_LAST_30_DAYS = "03"; |
63
|
|
|
/** @var string Between 30 and 60 days */ |
64
|
|
|
const CUSTOMER_ACCOUNT_CREATED_LAST_60_DAYS = "04"; |
65
|
|
|
/** @var string More than 60 day */ |
66
|
|
|
const CUSTOMER_ACCOUNT_CREATED_MORE_THAN_60_DAYS = "05"; |
67
|
|
|
|
68
|
|
|
/** @var string Modified in this session */ |
69
|
|
|
const CUSTOMER_ACCOUNT_MODIFIED_THIS_TRANSACTION = "01"; |
70
|
|
|
/** @var string Less than 30 days */ |
71
|
|
|
const CUSTOMER_ACCOUNT_MODIFIED_LAST_30_DAYS = "02"; |
72
|
|
|
/** @var string Between 30 and 60 days */ |
73
|
|
|
const CUSTOMER_ACCOUNT_MODIFIED_LAST_60_DAYS = "03"; |
74
|
|
|
/** @var string More than 60 day */ |
75
|
|
|
const CUSTOMER_ACCOUNT_MODIFIED_MORE_THAN_60_DAYS = "04"; |
76
|
|
|
|
77
|
|
|
/** @var string Unchanged */ |
78
|
|
|
const CUSTOMER_ACCOUNT_PASSWORD_MODIFIED_NONE = "01"; |
79
|
|
|
/** @var string Modified in this session */ |
80
|
|
|
const CUSTOMER_ACCOUNT_PASSWORD_MODIFIED_THIS_TRANSACTION = "02"; |
81
|
|
|
/** @var string Less than 30 days */ |
82
|
|
|
const CUSTOMER_ACCOUNT_PASSWORD_MODIFIED_LAST_30_DAYS = "03"; |
83
|
|
|
/** @var string Between 30 and 60 days */ |
84
|
|
|
const CUSTOMER_ACCOUNT_PASSWORD_MODIFIED_LAST_60_DAYS = "04"; |
85
|
|
|
/** @var string More than 60 day */ |
86
|
|
|
const CUSTOMER_ACCOUNT_PASSWORD_MODIFIED_MORE_THAN_60_DAYS = "05"; |
87
|
|
|
|
88
|
|
|
/** @var string No account (guest check-out) */ |
89
|
|
|
const PAYMENT_METHOD_CREATED_NONE = "01"; |
90
|
|
|
/** @var string Created during this transaction */ |
91
|
|
|
const PAYMENT_METHOD_CREATED_THIS_TRANSACTION = "02"; |
92
|
|
|
/** @var string Less than 30 days */ |
93
|
|
|
const PAYMENT_METHOD_CREATED_LAST_30_DAYS = "03"; |
94
|
|
|
/** @var string Between 30 and 60 days */ |
95
|
|
|
const PAYMENT_METHOD_CREATED_LAST_60_DAYS = "04"; |
96
|
|
|
/** @var string More than 60 day */ |
97
|
|
|
const PAYMENT_METHOD_CREATED_MORE_THAN_60_DAYS = "05"; |
98
|
|
|
|
99
|
|
|
/** @var string For the first time */ |
100
|
|
|
const SHIPPING_ADDRESS_USAGE_THIS_TRANSACTION = "01"; |
101
|
|
|
/** @var string Less than 30 days */ |
102
|
|
|
const SHIPPING_ADDRESS_USAGE_LAST_30_DAYS = "02"; |
103
|
|
|
/** @var string Between 30 and 60 days */ |
104
|
|
|
const SHIPPING_ADDRESS_USAGE_LAST_60_DAYS = "03"; |
105
|
|
|
/** @var string More than 60 day */ |
106
|
|
|
const SHIPPING_ADDRESS_USAGE_MORE_THAN_60_DAYS = "04"; |
107
|
|
|
|
108
|
|
|
/** @var string Electronic delivery */ |
109
|
|
|
const DELIVERY_TIMEFRAME_ELECTRONIC_DELIVERY = "01"; |
110
|
|
|
/** @var string Same day shipping */ |
111
|
|
|
const DELIVERY_TIMEFRAME_SAME_DAY = "02"; |
112
|
|
|
/** @var string Next day shipping */ |
113
|
|
|
const DELIVERY_TIMEFRAME_NEXT_DAY = "03"; |
114
|
|
|
/** @var string Shipping in 2 or more days */ |
115
|
|
|
const DELIVERY_TIMEFRAME_2_OR_MORE_DAYS = "04"; |
116
|
|
|
|
117
|
|
|
/** @var string Ship to cardholder's billing address */ |
118
|
|
|
const SHIPPING_TO_BILLING_ADDRESS = "01"; |
119
|
|
|
/** @var string Ship to another verified address on file with merchant */ |
120
|
|
|
const SHIPPING_TO_ANOTHER_VERIFIED_ADDRESS = "02"; |
121
|
|
|
/** @var string Ship to address that is different than the cardholder's billing address */ |
122
|
|
|
const SHIPPING_DIFFERENT_BILLING_ADDRESS = "03"; |
123
|
|
|
/** @var string Pick-up at local store (Store address shall be populated in shipping address fields) */ |
124
|
|
|
const SHIPPING_PICK_UP = "04"; |
125
|
|
|
/** @var string Digital goods (includes online services, electronic gift cards and redemption codes) */ |
126
|
|
|
const SHIPPING_DIGITAL = "05"; |
127
|
|
|
/** @var string Travel and Event tickets, not shipped */ |
128
|
|
|
const SHIPPING_TRAVEL = "06"; |
129
|
|
|
/** @var string Other (for example, Gaming, digital services not shipped, emedia subscriptions, etc.) */ |
130
|
|
|
const SHIPPING_OTHER = "07"; |
131
|
|
|
|
132
|
3 |
|
public function getCardholder() |
133
|
|
|
{ |
134
|
3 |
|
return $this->getParameter('cardholder'); |
135
|
|
|
} |
136
|
|
|
|
137
|
5 |
|
public function setCardholder($value) |
138
|
|
|
{ |
139
|
5 |
|
return $this->setParameter('cardholder', $value); |
140
|
|
|
} |
141
|
|
|
|
142
|
9 |
|
public function getConsumerLanguage() |
143
|
|
|
{ |
144
|
9 |
|
return $this->getParameter('consumerLanguage'); |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* Set the language presented to the consumer |
149
|
|
|
* |
150
|
|
|
* @param string|int Either the ISO 639-1 code to be converted, or the gateway's own numeric language code |
151
|
|
|
*/ |
152
|
8 |
|
public function setConsumerLanguage($value) |
153
|
|
|
{ |
154
|
8 |
|
if (is_int($value)) { |
155
|
1 |
|
if ($value < 0 || $value > 13) { |
156
|
1 |
|
$value = 1; |
157
|
|
|
} |
158
|
1 |
|
$value = str_pad($value, 3, '0', STR_PAD_LEFT); |
159
|
8 |
|
} elseif (!is_numeric($value)) { |
160
|
8 |
|
$value = isset(self::$consumerLanguages[$value]) ? self::$consumerLanguages[$value] : '001'; |
161
|
|
|
} |
162
|
|
|
|
163
|
8 |
|
return $this->setParameter('consumerLanguage', $value); |
164
|
|
|
} |
165
|
|
|
|
166
|
15 |
|
public function getHmacKey() |
167
|
|
|
{ |
168
|
15 |
|
return $this->getParameter('hmacKey'); |
169
|
|
|
} |
170
|
|
|
|
171
|
24 |
|
public function setHmacKey($value) |
172
|
|
|
{ |
173
|
24 |
|
return $this->setParameter('hmacKey', $value); |
174
|
|
|
} |
175
|
|
|
|
176
|
8 |
|
public function getMerchantData() |
177
|
|
|
{ |
178
|
8 |
|
return $this->getParameter('merchantData'); |
179
|
|
|
} |
180
|
|
|
|
181
|
8 |
|
public function setMerchantData($value) |
182
|
|
|
{ |
183
|
8 |
|
return $this->setParameter('merchantData', $value); |
184
|
|
|
} |
185
|
|
|
|
186
|
12 |
|
public function getMerchantId() |
187
|
|
|
{ |
188
|
12 |
|
return $this->getParameter('merchantId'); |
189
|
|
|
} |
190
|
|
|
|
191
|
24 |
|
public function setMerchantId($value) |
192
|
|
|
{ |
193
|
24 |
|
return $this->setParameter('merchantId', $value); |
194
|
|
|
} |
195
|
|
|
|
196
|
12 |
|
public function getMerchantName() |
197
|
|
|
{ |
198
|
12 |
|
return $this->getParameter('merchantName'); |
199
|
|
|
} |
200
|
|
|
|
201
|
24 |
|
public function setMerchantName($value) |
202
|
|
|
{ |
203
|
24 |
|
return $this->setParameter('merchantName', $value); |
204
|
|
|
} |
205
|
|
|
|
206
|
12 |
|
public function getTerminalId() |
207
|
|
|
{ |
208
|
12 |
|
return $this->getParameter('terminalId'); |
209
|
|
|
} |
210
|
|
|
|
211
|
24 |
|
public function setTerminalId($value) |
212
|
|
|
{ |
213
|
24 |
|
return $this->setParameter('terminalId', $value); |
214
|
|
|
} |
215
|
|
|
|
216
|
|
|
|
217
|
|
|
/** |
218
|
|
|
* Get the email field |
219
|
|
|
* |
220
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.email field in Redsys documentation. |
221
|
|
|
* |
222
|
|
|
* @return string |
223
|
|
|
*/ |
224
|
3 |
|
public function getEmail() |
225
|
|
|
{ |
226
|
3 |
|
return $this->getParameter('email'); |
227
|
|
|
} |
228
|
|
|
|
229
|
|
|
/** |
230
|
|
|
* Set the email field |
231
|
|
|
* |
232
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.email field in Redsys documentation. |
233
|
|
|
* |
234
|
|
|
* @param string $value |
235
|
|
|
* @return self |
236
|
|
|
*/ |
237
|
1 |
|
public function setEmail($value) |
238
|
|
|
{ |
239
|
1 |
|
return $this->setParameter('email', $value); |
240
|
|
|
} |
241
|
|
|
|
242
|
|
|
/** |
243
|
|
|
* Get the homePhoneCountryPrefix field |
244
|
|
|
* |
245
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.homePhone.cc field in Redsys documentation. |
246
|
|
|
* |
247
|
|
|
* @return string |
248
|
|
|
*/ |
249
|
3 |
|
public function getHomePhoneCountryPrefix() |
250
|
|
|
{ |
251
|
3 |
|
return $this->getParameter('homePhoneCountryPrefix'); |
252
|
|
|
} |
253
|
|
|
|
254
|
|
|
/** |
255
|
|
|
* Set the homePhoneCountryPrefix field |
256
|
|
|
* |
257
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.homePhone.cc field in the Redsys documentation. |
258
|
|
|
* |
259
|
|
|
* @param string $value |
260
|
|
|
* @return self |
261
|
|
|
*/ |
262
|
1 |
|
public function setHomePhoneCountryPrefix($value) |
263
|
|
|
{ |
264
|
1 |
|
return $this->setParameter('homePhoneCountryPrefix', $value); |
265
|
|
|
} |
266
|
|
|
|
267
|
|
|
/** |
268
|
|
|
* Get the homePhone field |
269
|
|
|
* |
270
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.homePhone.subscriber field in Redsys documentation. |
271
|
|
|
* |
272
|
|
|
* @return string |
273
|
|
|
*/ |
274
|
3 |
|
public function getHomePhone() |
275
|
|
|
{ |
276
|
3 |
|
return $this->getParameter('homePhone'); |
277
|
|
|
} |
278
|
|
|
|
279
|
|
|
/** |
280
|
|
|
* Set the homePhone field |
281
|
|
|
* |
282
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.homePhone.subscriber field in the Redsys documentation. |
283
|
|
|
* |
284
|
|
|
* @param string $value |
285
|
|
|
* @return self |
286
|
|
|
*/ |
287
|
1 |
|
public function setHomePhone($value) |
288
|
|
|
{ |
289
|
1 |
|
return $this->setParameter('homePhone', $value); |
290
|
|
|
} |
291
|
|
|
|
292
|
|
|
/** |
293
|
|
|
* Get the mobilePhoneCountryPrefix field |
294
|
|
|
* |
295
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.mobilePhone.cc field in Redsys documentation. |
296
|
|
|
* |
297
|
|
|
* @return string |
298
|
|
|
*/ |
299
|
3 |
|
public function getMobilePhoneCountryPrefix() |
300
|
|
|
{ |
301
|
3 |
|
return $this->getParameter('mobilePhoneCountryPrefix'); |
302
|
|
|
} |
303
|
|
|
|
304
|
|
|
/** |
305
|
|
|
* Set the mobilePhoneCountryPrefix field |
306
|
|
|
* |
307
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.mobilePhone.cc field in the Redsys documentation. |
308
|
|
|
* |
309
|
|
|
* @param string $value |
310
|
|
|
* @return self |
311
|
|
|
*/ |
312
|
1 |
|
public function setMobilePhoneCountryPrefix($value) |
313
|
|
|
{ |
314
|
1 |
|
return $this->setParameter('mobilePhoneCountryPrefix', $value); |
315
|
|
|
} |
316
|
|
|
|
317
|
|
|
/** |
318
|
|
|
* Get the mobilePhone field |
319
|
|
|
* |
320
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.mobilePhone.subscriber field in Redsys documentation. |
321
|
|
|
* |
322
|
|
|
* @return string |
323
|
|
|
*/ |
324
|
3 |
|
public function getMobilePhone() |
325
|
|
|
{ |
326
|
3 |
|
return $this->getParameter('mobilePhone'); |
327
|
|
|
} |
328
|
|
|
|
329
|
|
|
/** |
330
|
|
|
* Set the mobilePhone field |
331
|
|
|
* |
332
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.mobilePhone.subscriber field in the Redsys documentation. |
333
|
|
|
* |
334
|
|
|
* @param string $value |
335
|
|
|
* @return self |
336
|
|
|
*/ |
337
|
1 |
|
public function setMobilePhone($value) |
338
|
|
|
{ |
339
|
1 |
|
return $this->setParameter('mobilePhone', $value); |
340
|
|
|
} |
341
|
|
|
|
342
|
|
|
/** |
343
|
|
|
* Get the workPhoneCountryPrefix field |
344
|
|
|
* |
345
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.workPhone.cc field in Redsys documentation. |
346
|
|
|
* |
347
|
|
|
* @return string |
348
|
|
|
*/ |
349
|
3 |
|
public function getWorkPhoneCountryPrefix() |
350
|
|
|
{ |
351
|
3 |
|
return $this->getParameter('workPhoneCountryPrefix'); |
352
|
|
|
} |
353
|
|
|
|
354
|
|
|
/** |
355
|
|
|
* Set the workPhoneCountryPrefix field |
356
|
|
|
* |
357
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.workPhone.cc field in the Redsys documentation. |
358
|
|
|
* |
359
|
|
|
* @param string $value |
360
|
|
|
* @return self |
361
|
|
|
*/ |
362
|
1 |
|
public function setWorkPhoneCountryPrefix($value) |
363
|
|
|
{ |
364
|
1 |
|
return $this->setParameter('workPhoneCountryPrefix', $value); |
365
|
|
|
} |
366
|
|
|
|
367
|
|
|
/** |
368
|
|
|
* Get the workPhone field |
369
|
|
|
* |
370
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.workPhone.subscriber field in Redsys documentation. |
371
|
|
|
* |
372
|
|
|
* @return string |
373
|
|
|
*/ |
374
|
3 |
|
public function getWorkPhone() |
375
|
|
|
{ |
376
|
3 |
|
return $this->getParameter('workPhone'); |
377
|
|
|
} |
378
|
|
|
|
379
|
|
|
/** |
380
|
|
|
* Set the workPhone field |
381
|
|
|
* |
382
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.workPhone.subscriber field in the Redsys documentation. |
383
|
|
|
* |
384
|
|
|
* @param string $value |
385
|
|
|
* @return self |
386
|
|
|
*/ |
387
|
1 |
|
public function setWorkPhone($value) |
388
|
|
|
{ |
389
|
1 |
|
return $this->setParameter('workPhone', $value); |
390
|
|
|
} |
391
|
|
|
|
392
|
|
|
/** |
393
|
|
|
* Get the shippingAddress1 field |
394
|
|
|
* |
395
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrLine1 field in the Redsys documentation. |
396
|
|
|
* |
397
|
|
|
* @return string |
398
|
|
|
*/ |
399
|
3 |
|
public function getShippingAddress1() |
400
|
|
|
{ |
401
|
3 |
|
return $this->getParameter('shippingAddress1'); |
402
|
|
|
} |
403
|
|
|
|
404
|
|
|
/** |
405
|
|
|
* Set the shippingAddress1 field |
406
|
|
|
* |
407
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrLine1 field in the Redsys documentation. |
408
|
|
|
* |
409
|
|
|
* @param string $value |
410
|
|
|
* @return self |
411
|
|
|
*/ |
412
|
1 |
|
public function setShippingAddress1($value) |
413
|
|
|
{ |
414
|
1 |
|
return $this->setParameter('shippingAddress1', $value); |
415
|
|
|
} |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* Get the shippingAddress2 field |
419
|
|
|
* |
420
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrLine2 field in the Redsys documentation. |
421
|
|
|
* |
422
|
|
|
* @return string |
423
|
|
|
*/ |
424
|
3 |
|
public function getShippingAddress2() |
425
|
|
|
{ |
426
|
3 |
|
return $this->getParameter('shippingAddress2'); |
427
|
|
|
} |
428
|
|
|
|
429
|
|
|
/** |
430
|
|
|
* Set the shippingAddress2 field |
431
|
|
|
* |
432
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrLine2 field in the Redsys documentation. |
433
|
|
|
* |
434
|
|
|
* @param string $value |
435
|
|
|
* @return self |
436
|
|
|
*/ |
437
|
1 |
|
public function setShippingAddress2($value) |
438
|
|
|
{ |
439
|
1 |
|
return $this->setParameter('shippingAddress2', $value); |
440
|
|
|
} |
441
|
|
|
|
442
|
|
|
/** |
443
|
|
|
* Get the shippingAddress3 field |
444
|
|
|
* |
445
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrLine3 field in the Redsys documentation. |
446
|
|
|
* |
447
|
|
|
* @return string |
448
|
|
|
*/ |
449
|
3 |
|
public function getShippingAddress3() |
450
|
|
|
{ |
451
|
3 |
|
return $this->getParameter('shippingAddress3'); |
452
|
|
|
} |
453
|
|
|
|
454
|
|
|
/** |
455
|
|
|
* Set the shippingAddress3 field |
456
|
|
|
* |
457
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrLine3 field in the Redsys documentation. |
458
|
|
|
* |
459
|
|
|
* @param string $value |
460
|
|
|
* @return self |
461
|
|
|
*/ |
462
|
1 |
|
public function setShippingAddress3($value) |
463
|
|
|
{ |
464
|
1 |
|
return $this->setParameter('shippingAddress3', $value); |
465
|
|
|
} |
466
|
|
|
|
467
|
|
|
/** |
468
|
|
|
* Get the shippingCity field |
469
|
|
|
* |
470
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrCity field in the Redsys documentation. |
471
|
|
|
* |
472
|
|
|
* @return string |
473
|
|
|
*/ |
474
|
3 |
|
public function getShippingCity() |
475
|
|
|
{ |
476
|
3 |
|
return $this->getParameter('shippingCity'); |
477
|
|
|
} |
478
|
|
|
|
479
|
|
|
/** |
480
|
|
|
* Set the shippingCity field |
481
|
|
|
* |
482
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrCity field in the Redsys documentation. |
483
|
|
|
* |
484
|
|
|
* @param string $value The shipping state as an ISO3166-2 subdivision code, e.g. CA for California. |
485
|
|
|
* @return self |
486
|
|
|
*/ |
487
|
1 |
|
public function setShippingCity($value) |
488
|
|
|
{ |
489
|
1 |
|
return $this->setParameter('shippingCity', $value); |
490
|
|
|
} |
491
|
|
|
|
492
|
|
|
/** |
493
|
|
|
* Get the shippingPostcode field |
494
|
|
|
* |
495
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrPostCode field in the Redsys documentation. |
496
|
|
|
* |
497
|
|
|
* @return string |
498
|
|
|
*/ |
499
|
3 |
|
public function getShippingPostcode() |
500
|
|
|
{ |
501
|
3 |
|
return $this->getParameter('shippingPostcode'); |
502
|
|
|
} |
503
|
|
|
|
504
|
|
|
/** |
505
|
|
|
* Set the shippingPostcode field |
506
|
|
|
* |
507
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrPostCode field in the Redsys documentation. |
508
|
|
|
* |
509
|
|
|
* @param string $value |
510
|
|
|
* @return self |
511
|
|
|
*/ |
512
|
1 |
|
public function setShippingPostcode($value) |
513
|
|
|
{ |
514
|
1 |
|
return $this->setParameter('shippingPostcode', $value); |
515
|
|
|
} |
516
|
|
|
|
517
|
|
|
/** |
518
|
|
|
* Get the shippingState field |
519
|
|
|
* |
520
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrState field in the Redsys documentation. |
521
|
|
|
* |
522
|
|
|
* @return string The shipping state as an ISO3166-2 subdivision code, e.g. CA for California. |
523
|
|
|
*/ |
524
|
3 |
|
public function getShippingState() |
525
|
|
|
{ |
526
|
3 |
|
return $this->getParameter('shippingState'); |
527
|
|
|
} |
528
|
|
|
|
529
|
|
|
/** |
530
|
|
|
* Set the shippingState field |
531
|
|
|
* |
532
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrState field in the Redsys documentation. |
533
|
|
|
* |
534
|
|
|
* @param string $value |
535
|
|
|
* @return self |
536
|
|
|
*/ |
537
|
1 |
|
public function setShippingState($value) |
538
|
|
|
{ |
539
|
1 |
|
return $this->setParameter('shippingState', $value); |
540
|
|
|
} |
541
|
|
|
|
542
|
|
|
/** |
543
|
|
|
* Get the shippingCountry field |
544
|
|
|
* |
545
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrCountry field in the Redsys documentation. |
546
|
|
|
* |
547
|
|
|
* @return int The shipping country as an ISO3166 numeric code, e.g. 840 for USA. |
548
|
|
|
*/ |
549
|
3 |
|
public function getShippingCountry() |
550
|
|
|
{ |
551
|
3 |
|
return $this->getParameter('shippingCountry'); |
552
|
|
|
} |
553
|
|
|
|
554
|
|
|
/** |
555
|
|
|
* Set the shippingCountry field |
556
|
|
|
* |
557
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.shipAddrCountry field in the Redsys documentation. |
558
|
|
|
* |
559
|
|
|
* @param int $value The shipping country as an ISO3166 numeric code, e.g. 840 for USA. |
560
|
|
|
* @return self |
561
|
|
|
*/ |
562
|
1 |
|
public function setShippingCountry($value) |
563
|
|
|
{ |
564
|
1 |
|
return $this->setParameter('shippingCountry', $value); |
565
|
|
|
} |
566
|
|
|
|
567
|
|
|
/** |
568
|
|
|
* Get the billingAddress1 field |
569
|
|
|
* |
570
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrLine1 field in the Redsys documentation. |
571
|
|
|
* |
572
|
|
|
* @return string |
573
|
|
|
*/ |
574
|
3 |
|
public function getBillingAddress1() |
575
|
|
|
{ |
576
|
3 |
|
return $this->getParameter('billingAddress1'); |
577
|
|
|
} |
578
|
|
|
|
579
|
|
|
/** |
580
|
|
|
* Set the billingAddress1 field |
581
|
|
|
* |
582
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrLine1 field in the Redsys documentation. |
583
|
|
|
* |
584
|
|
|
* @param string $value |
585
|
|
|
* @return self |
586
|
|
|
*/ |
587
|
1 |
|
public function setBillingAddress1($value) |
588
|
|
|
{ |
589
|
1 |
|
return $this->setParameter('billingAddress1', $value); |
590
|
|
|
} |
591
|
|
|
|
592
|
|
|
/** |
593
|
|
|
* Get the billingAddress2 field |
594
|
|
|
* |
595
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrLine2 field in the Redsys documentation. |
596
|
|
|
* |
597
|
|
|
* @return string |
598
|
|
|
*/ |
599
|
3 |
|
public function getBillingAddress2() |
600
|
|
|
{ |
601
|
3 |
|
return $this->getParameter('billingAddress2'); |
602
|
|
|
} |
603
|
|
|
|
604
|
|
|
/** |
605
|
|
|
* Set the billingAddress2 field |
606
|
|
|
* |
607
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrLine2 field in the Redsys documentation. |
608
|
|
|
* |
609
|
|
|
* @param string $value |
610
|
|
|
* @return self |
611
|
|
|
*/ |
612
|
1 |
|
public function setBillingAddress2($value) |
613
|
|
|
{ |
614
|
1 |
|
return $this->setParameter('billingAddress2', $value); |
615
|
|
|
} |
616
|
|
|
|
617
|
|
|
/** |
618
|
|
|
* Get the billingAddress3 field |
619
|
|
|
* |
620
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrLine3 field in the Redsys documentation. |
621
|
|
|
* |
622
|
|
|
* @return string |
623
|
|
|
*/ |
624
|
3 |
|
public function getBillingAddress3() |
625
|
|
|
{ |
626
|
3 |
|
return $this->getParameter('billingAddress3'); |
627
|
|
|
} |
628
|
|
|
|
629
|
|
|
/** |
630
|
|
|
* Set the billingAddress3 field |
631
|
|
|
* |
632
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrLine3 field in the Redsys documentation. |
633
|
|
|
* |
634
|
|
|
* @param string $value |
635
|
|
|
* @return self |
636
|
|
|
*/ |
637
|
1 |
|
public function setBillingAddress3($value) |
638
|
|
|
{ |
639
|
1 |
|
return $this->setParameter('billingAddress3', $value); |
640
|
|
|
} |
641
|
|
|
|
642
|
|
|
/** |
643
|
|
|
* Get the billingCity field |
644
|
|
|
* |
645
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrCity field in the Redsys documentation. |
646
|
|
|
* |
647
|
|
|
* @return string |
648
|
|
|
*/ |
649
|
3 |
|
public function getBillingCity() |
650
|
|
|
{ |
651
|
3 |
|
return $this->getParameter('billingCity'); |
652
|
|
|
} |
653
|
|
|
|
654
|
|
|
/** |
655
|
|
|
* Set the billingCity field |
656
|
|
|
* |
657
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrCity field in the Redsys documentation. |
658
|
|
|
* |
659
|
|
|
* @param string $value The billing state as an ISO3166-2 subdivision code, e.g. CA for California. |
660
|
|
|
* @return self |
661
|
|
|
*/ |
662
|
1 |
|
public function setBillingCity($value) |
663
|
|
|
{ |
664
|
1 |
|
return $this->setParameter('billingCity', $value); |
665
|
|
|
} |
666
|
|
|
|
667
|
|
|
/** |
668
|
|
|
* Get the billingPostcode field |
669
|
|
|
* |
670
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrPostCode field in the Redsys documentation. |
671
|
|
|
* |
672
|
|
|
* @return string |
673
|
|
|
*/ |
674
|
3 |
|
public function getBillingPostcode() |
675
|
|
|
{ |
676
|
3 |
|
return $this->getParameter('billingPostcode'); |
677
|
|
|
} |
678
|
|
|
|
679
|
|
|
/** |
680
|
|
|
* Set the billingPostcode field |
681
|
|
|
* |
682
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrPostCode field in the Redsys documentation. |
683
|
|
|
* |
684
|
|
|
* @param string $value |
685
|
|
|
* @return self |
686
|
|
|
*/ |
687
|
1 |
|
public function setBillingPostcode($value) |
688
|
|
|
{ |
689
|
1 |
|
return $this->setParameter('billingPostcode', $value); |
690
|
|
|
} |
691
|
|
|
|
692
|
|
|
/** |
693
|
|
|
* Get the billingState field |
694
|
|
|
* |
695
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrState field in the Redsys documentation. |
696
|
|
|
* |
697
|
|
|
* @return string The billing state as an ISO3166-2 subdivision code, e.g. CA for California. |
698
|
|
|
*/ |
699
|
3 |
|
public function getBillingState() |
700
|
|
|
{ |
701
|
3 |
|
return $this->getParameter('billingState'); |
702
|
|
|
} |
703
|
|
|
|
704
|
|
|
/** |
705
|
|
|
* Set the billingState field |
706
|
|
|
* |
707
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrState field in the Redsys documentation. |
708
|
|
|
* |
709
|
|
|
* @param string $value |
710
|
|
|
* @return self |
711
|
|
|
*/ |
712
|
1 |
|
public function setBillingState($value) |
713
|
|
|
{ |
714
|
1 |
|
return $this->setParameter('billingState', $value); |
715
|
|
|
} |
716
|
|
|
|
717
|
|
|
/** |
718
|
|
|
* Get the billingCountry field |
719
|
|
|
* |
720
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrCountry field in the Redsys documentation. |
721
|
|
|
* |
722
|
|
|
* @return int The billing country as an ISO3166 numeric code, e.g. 840 for USA. |
723
|
|
|
*/ |
724
|
3 |
|
public function getBillingCountry() |
725
|
|
|
{ |
726
|
3 |
|
return $this->getParameter('billingCountry'); |
727
|
|
|
} |
728
|
|
|
|
729
|
|
|
/** |
730
|
|
|
* Set the billingCountry field |
731
|
|
|
* |
732
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.billAddrCountry field in the Redsys documentation. |
733
|
|
|
* |
734
|
|
|
* @param int $value The billing country as an ISO3166 numeric code, e.g. 840 for USA. |
735
|
|
|
* @return self |
736
|
|
|
*/ |
737
|
1 |
|
public function setBillingCountry($value) |
738
|
|
|
{ |
739
|
1 |
|
return $this->setParameter('billingCountry', $value); |
740
|
|
|
} |
741
|
|
|
|
742
|
|
|
/** |
743
|
|
|
* Get the addressMatch field |
744
|
|
|
* |
745
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.addrMatch field in Redsys documentation. |
746
|
|
|
* |
747
|
|
|
* @return boolean |
748
|
|
|
*/ |
749
|
3 |
|
public function getAddressMatch() |
750
|
|
|
{ |
751
|
3 |
|
return $this->getParameter('addressMatch'); |
752
|
|
|
} |
753
|
|
|
|
754
|
|
|
/** |
755
|
|
|
* Set the addressMatch field |
756
|
|
|
* |
757
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.addrMatch field in the Redsys documentation. |
758
|
|
|
* |
759
|
|
|
* @param boolean $value |
760
|
|
|
* @return self |
761
|
|
|
*/ |
762
|
1 |
|
public function setAddressMatch($value) |
763
|
|
|
{ |
764
|
1 |
|
return $this->setParameter('addressMatch', $value); |
765
|
|
|
} |
766
|
|
|
|
767
|
|
|
/** |
768
|
|
|
* Get the challengeWindowSize field |
769
|
|
|
* |
770
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.challengeWindowSize field in Redsys documentation. |
771
|
|
|
* |
772
|
|
|
* @return int One of the self::CHALLENGE_WINDOW_SIZE_* constants |
773
|
|
|
*/ |
774
|
3 |
|
public function getChallengeWindowSize() |
775
|
|
|
{ |
776
|
3 |
|
return $this->getParameter('challengeWindowSize'); |
777
|
|
|
} |
778
|
|
|
|
779
|
|
|
/** |
780
|
|
|
* Set the challengeWindowSize field |
781
|
|
|
* |
782
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.challengeWindowSize field in the Redsys documentation. |
783
|
|
|
* |
784
|
|
|
* @param int $value One of the self::CHALLENGE_WINDOW_SIZE_* constants |
785
|
|
|
* @return self |
786
|
|
|
*/ |
787
|
1 |
|
public function setChallengeWindowSize($value) |
788
|
|
|
{ |
789
|
1 |
|
return $this->setParameter('challengeWindowSize', $value); |
790
|
|
|
} |
791
|
|
|
|
792
|
|
|
/** |
793
|
|
|
* Get the customerAdditionalInformation field |
794
|
|
|
* |
795
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctID field in Redsys documentation. |
796
|
|
|
* |
797
|
|
|
* @return string |
798
|
|
|
*/ |
799
|
3 |
|
public function getCustomerAdditionalInformation() |
800
|
|
|
{ |
801
|
3 |
|
return $this->getParameter('customerAdditionalInformation'); |
802
|
|
|
} |
803
|
|
|
|
804
|
|
|
/** |
805
|
|
|
* Set the customerAdditionalInformation field |
806
|
|
|
* |
807
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctID field in the Redsys documentation. |
808
|
|
|
* |
809
|
|
|
* @param string $value |
810
|
|
|
* @return self |
811
|
|
|
*/ |
812
|
1 |
|
public function setCustomerAdditionalInformation($value) |
813
|
|
|
{ |
814
|
1 |
|
return $this->setParameter('customerAdditionalInformation', $value); |
815
|
|
|
} |
816
|
|
|
|
817
|
|
|
/** |
818
|
|
|
* Get the 3DsRequestAuthenticationMethodData field |
819
|
|
|
* |
820
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.threeDSRequestorAuthenticationInfo.threeDSReqAuthData field in Redsys |
821
|
|
|
* documentation. |
822
|
|
|
* |
823
|
|
|
* @return string |
824
|
|
|
*/ |
825
|
3 |
|
public function get3DsRequestAuthenticationMethodData() |
826
|
|
|
{ |
827
|
3 |
|
return $this->getParameter('3DsRequestAuthenticationMethodData'); |
828
|
|
|
} |
829
|
|
|
|
830
|
|
|
/** |
831
|
|
|
* Set the 3DsRequestAuthenticationMethodData field |
832
|
|
|
* |
833
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.threeDSRequestorAuthenticationInfo.threeDSReqAuthData field in the Redsys |
834
|
|
|
* documentation. |
835
|
|
|
* |
836
|
|
|
* @param string $value |
837
|
|
|
* @return self |
838
|
|
|
*/ |
839
|
1 |
|
public function set3DsRequestAuthenticationMethodData($value) |
840
|
|
|
{ |
841
|
1 |
|
return $this->setParameter('3DsRequestAuthenticationMethodData', $value); |
842
|
|
|
} |
843
|
|
|
|
844
|
|
|
/** |
845
|
|
|
* Get the 3DsRequestAuthenticationMethod field |
846
|
|
|
* |
847
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.threeDSRequestorAuthenticationInfo.threeDSReqAuthMethod field in Redsys |
848
|
|
|
* documentation. |
849
|
|
|
* |
850
|
|
|
* @return int One of the self::ACCOUNT_AUTHENTICATION_METHOD_* constants. |
851
|
|
|
*/ |
852
|
3 |
|
public function get3DsRequestAuthenticationMethod() |
853
|
|
|
{ |
854
|
3 |
|
return $this->getParameter('3DsRequestAuthenticationMethod'); |
855
|
|
|
} |
856
|
|
|
|
857
|
|
|
/** |
858
|
|
|
* Set the 3DsRequestAuthenticationMethod field |
859
|
|
|
* |
860
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.threeDSRequestorAuthenticationInfo.threeDSReqAuthMethod field in the Redsys |
861
|
|
|
* documentation. |
862
|
|
|
* |
863
|
|
|
* @param int $value One of the self::ACCOUNT_AUTHENTICATION_METHOD_* constants. |
864
|
|
|
* @return self |
865
|
|
|
*/ |
866
|
1 |
|
public function set3DsRequestAuthenticationMethod($value) |
867
|
|
|
{ |
868
|
1 |
|
return $this->setParameter('3DsRequestAuthenticationMethod', $value); |
869
|
|
|
} |
870
|
|
|
|
871
|
|
|
/** |
872
|
|
|
* Get the 3DsRequestAuthenticationTime field |
873
|
|
|
* |
874
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.threeDSRequestorAuthenticationInfo.threeDSReqAuthTimestamp field in Redsys |
875
|
|
|
* documentation. |
876
|
|
|
* |
877
|
|
|
* @return DateTime|int |
878
|
|
|
*/ |
879
|
3 |
|
public function get3DsRequestAuthenticationTime() |
880
|
|
|
{ |
881
|
3 |
|
return $this->getParameter('3DsRequestAuthenticationTime'); |
882
|
|
|
} |
883
|
|
|
|
884
|
|
|
/** |
885
|
|
|
* Set the 3DsRequestAuthenticationTime field |
886
|
|
|
* |
887
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.threeDSRequestorAuthenticationInfo.threeDSReqAuthTimestamp field in the |
888
|
|
|
* Redsys documentation. |
889
|
|
|
* |
890
|
|
|
* @param DateTime|int $value |
891
|
|
|
* @return self |
892
|
|
|
*/ |
893
|
1 |
|
public function set3DsRequestAuthenticationTime($value) |
894
|
|
|
{ |
895
|
1 |
|
return $this->setParameter('3DsRequestAuthenticationTime', $value); |
896
|
|
|
} |
897
|
|
|
|
898
|
|
|
/** |
899
|
|
|
* Get the customerAccountCreationIndicator field |
900
|
|
|
* |
901
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccAgeInd field in Redsys documentation. |
902
|
|
|
* |
903
|
|
|
* @return int CUSTOMER_ACCOUNT_CREATED_* |
904
|
|
|
*/ |
905
|
3 |
|
public function getCustomerAccountCreationIndicator() |
906
|
|
|
{ |
907
|
3 |
|
return $this->getParameter('customerAccountCreationIndicator'); |
908
|
|
|
} |
909
|
|
|
|
910
|
|
|
/** |
911
|
|
|
* Set the customerAccountCreationIndicator field |
912
|
|
|
* |
913
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccAgeInd field in the Redsys documentation. |
914
|
|
|
* |
915
|
|
|
* @param int $value CUSTOMER_ACCOUNT_CREATED_* |
916
|
|
|
* @return self |
917
|
|
|
*/ |
918
|
1 |
|
public function setCustomerAccountCreationIndicator($value) |
919
|
|
|
{ |
920
|
1 |
|
return $this->setParameter('customerAccountCreationIndicator', $value); |
921
|
|
|
} |
922
|
|
|
|
923
|
|
|
/** |
924
|
|
|
* Get the customerAccountCreationDate field |
925
|
|
|
* |
926
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccDate field in Redsys documentation. |
927
|
|
|
* |
928
|
|
|
* @return DateTime|int |
929
|
|
|
*/ |
930
|
3 |
|
public function getCustomerAccountCreationDate() |
931
|
|
|
{ |
932
|
3 |
|
return $this->getParameter('customerAccountCreationDate'); |
933
|
|
|
} |
934
|
|
|
|
935
|
|
|
/** |
936
|
|
|
* Set the customerAccountCreationDate field |
937
|
|
|
* |
938
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccDate field in the Redsys documentation. |
939
|
|
|
* |
940
|
|
|
* @param DateTime|int $value |
941
|
|
|
* @return self |
942
|
|
|
*/ |
943
|
1 |
|
public function setCustomerAccountCreationDate($value) |
944
|
|
|
{ |
945
|
1 |
|
return $this->setParameter('customerAccountCreationDate', $value); |
946
|
|
|
} |
947
|
|
|
|
948
|
|
|
/** |
949
|
|
|
* Get the customerAccountModificationIndicator field |
950
|
|
|
* |
951
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccChangeInd field in Redsys documentation. |
952
|
|
|
* |
953
|
|
|
* @return int CUSTOMER_ACCOUNT_MODIFIED_* |
954
|
|
|
*/ |
955
|
3 |
|
public function getCustomerAccountModificationIndicator() |
956
|
|
|
{ |
957
|
3 |
|
return $this->getParameter('customerAccountModificationIndicator'); |
958
|
|
|
} |
959
|
|
|
|
960
|
|
|
/** |
961
|
|
|
* Set the customerAccountModificationIndicator field |
962
|
|
|
* |
963
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccChangeInd field in the Redsys documentation. |
964
|
|
|
* |
965
|
|
|
* @param int $value CUSTOMER_ACCOUNT_MODIFIED_* |
966
|
|
|
* @return self |
967
|
|
|
*/ |
968
|
1 |
|
public function setCustomerAccountModificationIndicator($value) |
969
|
|
|
{ |
970
|
1 |
|
return $this->setParameter('customerAccountModificationIndicator', $value); |
971
|
|
|
} |
972
|
|
|
|
973
|
|
|
/** |
974
|
|
|
* Get the customerAccountModificationDate field |
975
|
|
|
* |
976
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccChange field in Redsys documentation. |
977
|
|
|
* |
978
|
|
|
* @return DateTime|int |
979
|
|
|
*/ |
980
|
3 |
|
public function getCustomerAccountModificationDate() |
981
|
|
|
{ |
982
|
3 |
|
return $this->getParameter('customerAccountModificationDate'); |
983
|
|
|
} |
984
|
|
|
|
985
|
|
|
/** |
986
|
|
|
* Set the customerAccountModificationDate field |
987
|
|
|
* |
988
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccChange field in the Redsys documentation. |
989
|
|
|
* |
990
|
|
|
* @param DateTime|int $value |
991
|
|
|
* @return self |
992
|
|
|
*/ |
993
|
1 |
|
public function setCustomerAccountModificationDate($value) |
994
|
|
|
{ |
995
|
1 |
|
return $this->setParameter('customerAccountModificationDate', $value); |
996
|
|
|
} |
997
|
|
|
|
998
|
|
|
/** |
999
|
|
|
* Get the customerPasswordAgeIndicator field |
1000
|
|
|
* |
1001
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccPwChangeInd field in Redsys documentation. |
1002
|
|
|
* |
1003
|
|
|
* @return int CUSTOMER_ACCOUNT_PASSWORD_MODIFIED_* |
1004
|
|
|
*/ |
1005
|
3 |
|
public function getCustomerPasswordModificationIndicator() |
1006
|
|
|
{ |
1007
|
3 |
|
return $this->getParameter('customerPasswordAgeIndicator'); |
1008
|
|
|
} |
1009
|
|
|
|
1010
|
|
|
/** |
1011
|
|
|
* Set the customerPasswordAgeIndicator field |
1012
|
|
|
* |
1013
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccPwChangeInd field in the Redsys documentation. |
1014
|
|
|
* |
1015
|
|
|
* @param int $value CUSTOMER_ACCOUNT_PASSWORD_MODIFIED_* |
1016
|
|
|
* @return self |
1017
|
|
|
*/ |
1018
|
1 |
|
public function setCustomerPasswordModificationIndicator($value) |
1019
|
|
|
{ |
1020
|
1 |
|
return $this->setParameter('customerPasswordAgeIndicator', $value); |
1021
|
|
|
} |
1022
|
|
|
|
1023
|
|
|
/** |
1024
|
|
|
* Get the customerPasswordModificationDate field |
1025
|
|
|
* |
1026
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccPwChange field in Redsys documentation. |
1027
|
|
|
* |
1028
|
|
|
* @return DateTime|int |
1029
|
|
|
*/ |
1030
|
3 |
|
public function getCustomerPasswordModificationDate() |
1031
|
|
|
{ |
1032
|
3 |
|
return $this->getParameter('customerPasswordModificationDate'); |
1033
|
|
|
} |
1034
|
|
|
|
1035
|
|
|
/** |
1036
|
|
|
* Set the customerPasswordModificationDate field |
1037
|
|
|
* |
1038
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.chAccPwChange field in the Redsys documentation. |
1039
|
|
|
* |
1040
|
|
|
* @param DateTime|int $value |
1041
|
|
|
* @return self |
1042
|
|
|
*/ |
1043
|
1 |
|
public function setCustomerPasswordModificationDate($value) |
1044
|
|
|
{ |
1045
|
1 |
|
return $this->setParameter('customerPasswordModificationDate', $value); |
1046
|
|
|
} |
1047
|
|
|
|
1048
|
|
|
/** |
1049
|
|
|
* Get the customerPurchasesInLast6Months field |
1050
|
|
|
* |
1051
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.nbPurchaseAccount field in Redsys documentation. |
1052
|
|
|
* |
1053
|
|
|
* @return int |
1054
|
|
|
*/ |
1055
|
3 |
|
public function getCustomerPurchasesInLast6Months() |
1056
|
|
|
{ |
1057
|
3 |
|
return $this->getParameter('customerPurchasesInLast6Months'); |
1058
|
|
|
} |
1059
|
|
|
|
1060
|
|
|
/** |
1061
|
|
|
* Set the customerPurchasesInLast6Months field |
1062
|
|
|
* |
1063
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.nbPurchaseAccount field in the Redsys documentation. |
1064
|
|
|
* |
1065
|
|
|
* @param int $value |
1066
|
|
|
* @return self |
1067
|
|
|
*/ |
1068
|
1 |
|
public function setCustomerPurchasesInLast6Months($value) |
1069
|
|
|
{ |
1070
|
1 |
|
return $this->setParameter('customerPurchasesInLast6Months', $value); |
1071
|
|
|
} |
1072
|
|
|
|
1073
|
|
|
/** |
1074
|
|
|
* Get the customerAccountCardProvisionsLast24Hours field |
1075
|
|
|
* |
1076
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.provisionAttemptsDay field in Redsys documentation. |
1077
|
|
|
* |
1078
|
|
|
* @return int |
1079
|
|
|
*/ |
1080
|
3 |
|
public function getCustomerAccountCardProvisionsLast24Hours() |
1081
|
|
|
{ |
1082
|
3 |
|
return $this->getParameter('customerAccountCardProvisionsLast24Hours'); |
1083
|
|
|
} |
1084
|
|
|
|
1085
|
|
|
/** |
1086
|
|
|
* Set the customerAccountCardProvisionsLast24Hours field |
1087
|
|
|
* |
1088
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.provisionAttemptsDay field in the Redsys documentation. |
1089
|
|
|
* |
1090
|
|
|
* @param int $value |
1091
|
|
|
* @return self |
1092
|
|
|
*/ |
1093
|
1 |
|
public function setCustomerAccountCardProvisionsLast24Hours($value) |
1094
|
|
|
{ |
1095
|
1 |
|
return $this->setParameter('customerAccountCardProvisionsLast24Hours', $value); |
1096
|
|
|
} |
1097
|
|
|
|
1098
|
|
|
/** |
1099
|
|
|
* Get the customerAccountTransactionsLast24Hours field |
1100
|
|
|
* |
1101
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.txnActivityDay field in Redsys documentation. |
1102
|
|
|
* |
1103
|
|
|
* @return int |
1104
|
|
|
*/ |
1105
|
3 |
|
public function getCustomerAccountTransactionsLast24Hours() |
1106
|
|
|
{ |
1107
|
3 |
|
return $this->getParameter('customerAccountTransactionsLast24Hours'); |
1108
|
|
|
} |
1109
|
|
|
|
1110
|
|
|
/** |
1111
|
|
|
* Set the customerAccountTransactionsLast24Hours field |
1112
|
|
|
* |
1113
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.txnActivityDay field in the Redsys documentation. |
1114
|
|
|
* |
1115
|
|
|
* @param int $value |
1116
|
|
|
* @return self |
1117
|
|
|
*/ |
1118
|
1 |
|
public function setCustomerAccountTransactionsLast24Hours($value) |
1119
|
|
|
{ |
1120
|
1 |
|
return $this->setParameter('customerAccountTransactionsLast24Hours', $value); |
1121
|
|
|
} |
1122
|
|
|
|
1123
|
|
|
/** |
1124
|
|
|
* Get the customerAccountTransactionsLastYear field |
1125
|
|
|
* |
1126
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.txnActivityYear field in Redsys documentation. |
1127
|
|
|
* |
1128
|
|
|
* @return int |
1129
|
|
|
*/ |
1130
|
3 |
|
public function getCustomerAccountTransactionsLastYear() |
1131
|
|
|
{ |
1132
|
3 |
|
return $this->getParameter('customerAccountTransactionsLastYear'); |
1133
|
|
|
} |
1134
|
|
|
|
1135
|
|
|
/** |
1136
|
|
|
* Set the customerAccountTransactionsLastYear field |
1137
|
|
|
* |
1138
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.txnActivityYear field in the Redsys documentation. |
1139
|
|
|
* |
1140
|
|
|
* @param int $value |
1141
|
|
|
* @return self |
1142
|
|
|
*/ |
1143
|
1 |
|
public function setCustomerAccountTransactionsLastYear($value) |
1144
|
|
|
{ |
1145
|
1 |
|
return $this->setParameter('customerAccountTransactionsLastYear', $value); |
1146
|
|
|
} |
1147
|
|
|
|
1148
|
|
|
/** |
1149
|
|
|
* Get the customerPaymentMethodCreationIndicator field |
1150
|
|
|
* |
1151
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.paymentAccInd field in Redsys documentation. |
1152
|
|
|
* |
1153
|
|
|
* @return int PAYMENT_METHOD_CREATED_* |
1154
|
|
|
*/ |
1155
|
3 |
|
public function getCustomerPaymentMethodCreationIndicator() |
1156
|
|
|
{ |
1157
|
3 |
|
return $this->getParameter('customerPaymentMethodCreationIndicator'); |
1158
|
|
|
} |
1159
|
|
|
|
1160
|
|
|
/** |
1161
|
|
|
* Set the customerPaymentMethodCreationIndicator field |
1162
|
|
|
* |
1163
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.paymentAccInd field in the Redsys documentation. |
1164
|
|
|
* |
1165
|
|
|
* @param int PAYMENT_METHOD_CREATED_* $value |
1166
|
|
|
* @return self |
1167
|
|
|
*/ |
1168
|
1 |
|
public function setCustomerPaymentMethodCreationIndicator($value) |
1169
|
|
|
{ |
1170
|
1 |
|
return $this->setParameter('customerPaymentMethodCreationIndicator', $value); |
1171
|
|
|
} |
1172
|
|
|
|
1173
|
|
|
/** |
1174
|
|
|
* Get the customerPaymentMethodCreationDate field |
1175
|
|
|
* |
1176
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.paymentAccAge field in Redsys documentation. |
1177
|
|
|
* |
1178
|
|
|
* @return DateTime|int |
1179
|
|
|
*/ |
1180
|
3 |
|
public function getCustomerPaymentMethodCreationDate() |
1181
|
|
|
{ |
1182
|
3 |
|
return $this->getParameter('customerPaymentMethodCreationDate'); |
1183
|
|
|
} |
1184
|
|
|
|
1185
|
|
|
/** |
1186
|
|
|
* Set the customerPaymentMethodCreationDate field |
1187
|
|
|
* |
1188
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.paymentAccAge field in the Redsys documentation. |
1189
|
|
|
* |
1190
|
|
|
* @param DateTime|int $value |
1191
|
|
|
* @return self |
1192
|
|
|
*/ |
1193
|
1 |
|
public function setCustomerPaymentMethodCreationDate($value) |
1194
|
|
|
{ |
1195
|
1 |
|
return $this->setParameter('customerPaymentMethodCreationDate', $value); |
1196
|
|
|
} |
1197
|
|
|
|
1198
|
|
|
/** |
1199
|
|
|
* Get the shippingAddressFirstUsedIndicator field |
1200
|
|
|
* |
1201
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.shipAddressUsageInd field in Redsys documentation. |
1202
|
|
|
* |
1203
|
|
|
* @return int SHIPPING_ADDRESS_USAGE_* |
1204
|
|
|
*/ |
1205
|
3 |
|
public function getShippingAddressFirstUsedIndicator() |
1206
|
|
|
{ |
1207
|
3 |
|
return $this->getParameter('shippingAddressFirstUsedIndicator'); |
1208
|
|
|
} |
1209
|
|
|
|
1210
|
|
|
/** |
1211
|
|
|
* Set the shippingAddressFirstUsedIndicator field |
1212
|
|
|
* |
1213
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.shipAddressUsageInd field in the Redsys documentation. |
1214
|
|
|
* |
1215
|
|
|
* @param int $value SHIPPING_ADDRESS_USAGE_* |
1216
|
|
|
* @return self |
1217
|
|
|
*/ |
1218
|
1 |
|
public function setShippingAddressFirstUsedIndicator($value) |
1219
|
|
|
{ |
1220
|
1 |
|
return $this->setParameter('shippingAddressFirstUsedIndicator', $value); |
1221
|
|
|
} |
1222
|
|
|
|
1223
|
|
|
/** |
1224
|
|
|
* Get the shippingAddressFirstUsedDate field |
1225
|
|
|
* |
1226
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.shipAddressUsage field in Redsys documentation. |
1227
|
|
|
* |
1228
|
|
|
* @return DateTime|int |
1229
|
|
|
*/ |
1230
|
3 |
|
public function getShippingAddressFirstUsedDate() |
1231
|
|
|
{ |
1232
|
3 |
|
return $this->getParameter('shippingAddressFirstUsedDate'); |
1233
|
|
|
} |
1234
|
|
|
|
1235
|
|
|
/** |
1236
|
|
|
* Set the shippingAddressFirstUsedDate field |
1237
|
|
|
* |
1238
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.shipAddressUsage field in the Redsys documentation. |
1239
|
|
|
* |
1240
|
|
|
* @param DateTime|int $value |
1241
|
|
|
* @return self |
1242
|
|
|
*/ |
1243
|
1 |
|
public function setShippingAddressFirstUsedDate($value) |
1244
|
|
|
{ |
1245
|
1 |
|
return $this->setParameter('shippingAddressFirstUsedDate', $value); |
1246
|
|
|
} |
1247
|
|
|
|
1248
|
|
|
/** |
1249
|
|
|
* Get the shippingNameCustomerNameMatch field |
1250
|
|
|
* |
1251
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.shipNameIndicator field in Redsys documentation. |
1252
|
|
|
* |
1253
|
|
|
* @return boolean |
1254
|
|
|
*/ |
1255
|
3 |
|
public function getShippingNameCustomerNameMatch() |
1256
|
|
|
{ |
1257
|
3 |
|
return $this->getParameter('shippingNameCustomerNameMatch'); |
1258
|
|
|
} |
1259
|
|
|
|
1260
|
|
|
/** |
1261
|
|
|
* Set the shippingNameCustomerNameMatch field |
1262
|
|
|
* |
1263
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.shipNameIndicator field in the Redsys documentation. |
1264
|
|
|
* |
1265
|
|
|
* @param boolean $value |
1266
|
|
|
* @return self |
1267
|
|
|
*/ |
1268
|
1 |
|
public function setShippingNameCustomerNameMatch($value) |
1269
|
|
|
{ |
1270
|
1 |
|
return $this->setParameter('shippingNameCustomerNameMatch', $value); |
1271
|
|
|
} |
1272
|
|
|
|
1273
|
|
|
/** |
1274
|
|
|
* Get the customerHasSuspiciousActivity field |
1275
|
|
|
* |
1276
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.suspiciousAccActivity field in Redsys documentation. |
1277
|
|
|
* |
1278
|
|
|
* @return boolean |
1279
|
|
|
*/ |
1280
|
3 |
|
public function getCustomerHasSuspiciousActivity() |
1281
|
|
|
{ |
1282
|
3 |
|
return $this->getParameter('customerHasSuspiciousActivity'); |
1283
|
|
|
} |
1284
|
|
|
|
1285
|
|
|
/** |
1286
|
|
|
* Set the customerHasSuspiciousActivity field |
1287
|
|
|
* |
1288
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.acctInfo.suspiciousAccActivity field in the Redsys documentation. |
1289
|
|
|
* |
1290
|
|
|
* @param boolean $value |
1291
|
|
|
* @return self |
1292
|
|
|
*/ |
1293
|
1 |
|
public function setCustomerHasSuspiciousActivity($value) |
1294
|
|
|
{ |
1295
|
1 |
|
return $this->setParameter('customerHasSuspiciousActivity', $value); |
1296
|
|
|
} |
1297
|
|
|
|
1298
|
|
|
/** |
1299
|
|
|
* Get the deliveryEmail field |
1300
|
|
|
* |
1301
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.deliveryEmailAddress field in Redsys documentation. |
1302
|
|
|
* |
1303
|
|
|
* @return string |
1304
|
|
|
*/ |
1305
|
3 |
|
public function getDeliveryEmail() |
1306
|
|
|
{ |
1307
|
3 |
|
return $this->getParameter('deliveryEmail'); |
1308
|
|
|
} |
1309
|
|
|
|
1310
|
|
|
/** |
1311
|
|
|
* Set the deliveryEmail field |
1312
|
|
|
* |
1313
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.deliveryEmailAddress field in the Redsys |
1314
|
|
|
* documentation. |
1315
|
|
|
* |
1316
|
|
|
* @param string $value |
1317
|
|
|
* @return self |
1318
|
|
|
*/ |
1319
|
1 |
|
public function setDeliveryEmail($value) |
1320
|
|
|
{ |
1321
|
1 |
|
return $this->setParameter('deliveryEmail', $value); |
1322
|
|
|
} |
1323
|
|
|
|
1324
|
|
|
/** |
1325
|
|
|
* Get the deliveryTimeframeIndicator field |
1326
|
|
|
* |
1327
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.deliveryTimeframe field in Redsys documentation. |
1328
|
|
|
* |
1329
|
|
|
* @return int DELIVERY_TIMEFRAME_* |
1330
|
|
|
*/ |
1331
|
3 |
|
public function getDeliveryTimeframeIndicator() |
1332
|
|
|
{ |
1333
|
3 |
|
return $this->getParameter('deliveryTimeframeIndicator'); |
1334
|
|
|
} |
1335
|
|
|
|
1336
|
|
|
/** |
1337
|
|
|
* Set the deliveryTimeframeIndicator field |
1338
|
|
|
* |
1339
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.deliveryTimeframe field in the Redsys documentation. |
1340
|
|
|
* |
1341
|
|
|
* @param int $value DELIVERY_TIMEFRAME_* |
1342
|
|
|
* @return self |
1343
|
|
|
*/ |
1344
|
1 |
|
public function setDeliveryTimeframeIndicator($value) |
1345
|
|
|
{ |
1346
|
1 |
|
return $this->setParameter('deliveryTimeframeIndicator', $value); |
1347
|
|
|
} |
1348
|
|
|
|
1349
|
|
|
/** |
1350
|
|
|
* Get the giftCardAmount field |
1351
|
|
|
* |
1352
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.giftCardAmount field in Redsys documentation. |
1353
|
|
|
* |
1354
|
|
|
* @return int |
1355
|
|
|
*/ |
1356
|
3 |
|
public function getGiftCardAmount() |
1357
|
|
|
{ |
1358
|
3 |
|
return $this->getParameter('giftCardAmount'); |
1359
|
|
|
} |
1360
|
|
|
|
1361
|
|
|
/** |
1362
|
|
|
* Set the giftCardAmount field |
1363
|
|
|
* |
1364
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.giftCardAmount field in the Redsys documentation. |
1365
|
|
|
* |
1366
|
|
|
* @param int $value |
1367
|
|
|
* @return self |
1368
|
|
|
*/ |
1369
|
1 |
|
public function setGiftCardAmount($value) |
1370
|
|
|
{ |
1371
|
1 |
|
return $this->setParameter('giftCardAmount', $value); |
1372
|
|
|
} |
1373
|
|
|
|
1374
|
|
|
/** |
1375
|
|
|
* Get the giftCardCount field |
1376
|
|
|
* |
1377
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.giftCardCount field in Redsys documentation. |
1378
|
|
|
* |
1379
|
|
|
* @return int |
1380
|
|
|
*/ |
1381
|
3 |
|
public function getGiftCardCount() |
1382
|
|
|
{ |
1383
|
3 |
|
return $this->getParameter('giftCardCount'); |
1384
|
|
|
} |
1385
|
|
|
|
1386
|
|
|
/** |
1387
|
|
|
* Set the giftCardCount field |
1388
|
|
|
* |
1389
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.giftCardCount field in the Redsys documentation. |
1390
|
|
|
* |
1391
|
|
|
* @param int $value |
1392
|
|
|
* @return self |
1393
|
|
|
*/ |
1394
|
1 |
|
public function setGiftCardCount($value) |
1395
|
|
|
{ |
1396
|
1 |
|
return $this->setParameter('giftCardCount', $value); |
1397
|
|
|
} |
1398
|
|
|
|
1399
|
|
|
/** |
1400
|
|
|
* Get the giftCardCurrency field |
1401
|
|
|
* |
1402
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.giftCardCurr field in Redsys documentation. |
1403
|
|
|
* |
1404
|
|
|
* @return string ISO-4217 currency code |
1405
|
|
|
*/ |
1406
|
3 |
|
public function getGiftCardCurrency() |
1407
|
|
|
{ |
1408
|
3 |
|
return $this->getParameter('giftCardCurrency'); |
1409
|
|
|
} |
1410
|
|
|
|
1411
|
|
|
/** |
1412
|
|
|
* Set the giftCardCurrency field |
1413
|
|
|
* |
1414
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.giftCardCurr field in the Redsys documentation. |
1415
|
|
|
* |
1416
|
|
|
* @param string $value ISO-4217 currency code |
1417
|
|
|
* @return self |
1418
|
|
|
*/ |
1419
|
1 |
|
public function setGiftCardCurrency($value) |
1420
|
|
|
{ |
1421
|
1 |
|
return $this->setParameter('giftCardCurrency', $value); |
1422
|
|
|
} |
1423
|
|
|
|
1424
|
|
|
/** |
1425
|
|
|
* Get the purchasingPreOrder field |
1426
|
|
|
* |
1427
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.preOrderPurchaseInd field in Redsys documentation. |
1428
|
|
|
* |
1429
|
|
|
* @return boolean True if the customer is purchasing a preorder |
1430
|
|
|
*/ |
1431
|
3 |
|
public function getPurchasingPreOrder() |
1432
|
|
|
{ |
1433
|
3 |
|
return $this->getParameter('purchasingPreOrder'); |
1434
|
|
|
} |
1435
|
|
|
|
1436
|
|
|
/** |
1437
|
|
|
* Set the purchasingPreOrder field |
1438
|
|
|
* |
1439
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.preOrderPurchaseInd field in the Redsys |
1440
|
|
|
* documentation. |
1441
|
|
|
* |
1442
|
|
|
* @param boolean $value True if the customer is purchasing a preorder |
1443
|
|
|
* @return self |
1444
|
|
|
*/ |
1445
|
1 |
|
public function setPurchasingPreOrder($value) |
1446
|
|
|
{ |
1447
|
1 |
|
return $this->setParameter('purchasingPreOrder', $value); |
1448
|
|
|
} |
1449
|
|
|
|
1450
|
|
|
/** |
1451
|
|
|
* Get the preOrderDate field |
1452
|
|
|
* |
1453
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.preOrderDate field in Redsys documentation. |
1454
|
|
|
* |
1455
|
|
|
* @return DateTime|int |
1456
|
|
|
*/ |
1457
|
3 |
|
public function getPreOrderDate() |
1458
|
|
|
{ |
1459
|
3 |
|
return $this->getParameter('preOrderDate'); |
1460
|
|
|
} |
1461
|
|
|
|
1462
|
|
|
/** |
1463
|
|
|
* Set the preOrderDate field |
1464
|
|
|
* |
1465
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.preOrderDate field in the Redsys documentation. |
1466
|
|
|
* |
1467
|
|
|
* @param DateTime|int $value |
1468
|
|
|
* @return self |
1469
|
|
|
*/ |
1470
|
1 |
|
public function setPreOrderDate($value) |
1471
|
|
|
{ |
1472
|
1 |
|
return $this->setParameter('preOrderDate', $value); |
1473
|
|
|
} |
1474
|
|
|
|
1475
|
|
|
/** |
1476
|
|
|
* Get the customerHasPurchasedProductBefore field |
1477
|
|
|
* |
1478
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.reorderItemsInd field in Redsys documentation. |
1479
|
|
|
* |
1480
|
|
|
* @return boolean |
1481
|
|
|
*/ |
1482
|
3 |
|
public function getCustomerHasPurchasedProductBefore() |
1483
|
|
|
{ |
1484
|
3 |
|
return $this->getParameter('customerHasPurchasedProductBefore'); |
1485
|
|
|
} |
1486
|
|
|
|
1487
|
|
|
/** |
1488
|
|
|
* Set the customerHasPurchasedProductBefore field |
1489
|
|
|
* |
1490
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.reorderItemsInd field in the Redsys documentation. |
1491
|
|
|
* |
1492
|
|
|
* @param boolean $value |
1493
|
|
|
* @return self |
1494
|
|
|
*/ |
1495
|
1 |
|
public function setCustomerHasPurchasedProductBefore($value) |
1496
|
|
|
{ |
1497
|
1 |
|
return $this->setParameter('customerHasPurchasedProductBefore', $value); |
1498
|
|
|
} |
1499
|
|
|
|
1500
|
|
|
/** |
1501
|
|
|
* Get the shippingAddressIndicator field |
1502
|
|
|
* |
1503
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.shipIndicator field in Redsys documentation. |
1504
|
|
|
* |
1505
|
|
|
* @return int SHIPPING_* |
1506
|
|
|
*/ |
1507
|
3 |
|
public function getShippingAddressIndicator() |
1508
|
|
|
{ |
1509
|
3 |
|
return $this->getParameter('shippingAddressIndicator'); |
1510
|
|
|
} |
1511
|
|
|
|
1512
|
|
|
/** |
1513
|
|
|
* Set the shippingAddressIndicator field |
1514
|
|
|
* |
1515
|
|
|
* Corresponds to the Ds_Merchant_Emv3Ds.MerchantRiskIndicator.shipIndicator field in the Redsys documentation. |
1516
|
|
|
* |
1517
|
|
|
* @param int $value SHIPPING_* |
1518
|
|
|
* @return self |
1519
|
|
|
*/ |
1520
|
1 |
|
public function setShippingAddressIndicator($value) |
1521
|
|
|
{ |
1522
|
1 |
|
return $this->setParameter('shippingAddressIndicator', $value); |
1523
|
|
|
} |
1524
|
|
|
|
1525
|
|
|
/** |
1526
|
|
|
* Override the abstract method to add requirement that it must start with 4 numeric characters |
1527
|
|
|
* |
1528
|
|
|
* @param string|int $value The transaction ID (merchant order) to set for the transaction |
1529
|
|
|
*/ |
1530
|
16 |
|
public function setTransactionId($value) |
1531
|
|
|
{ |
1532
|
16 |
|
$start = substr($value, 0, 4); |
1533
|
16 |
|
$numerics = 0; |
1534
|
16 |
|
foreach (str_split($start) as $char) { |
1535
|
16 |
|
if (is_numeric($char)) { |
1536
|
16 |
|
$numerics++; |
1537
|
|
|
} else { |
1538
|
16 |
|
break; |
1539
|
|
|
} |
1540
|
|
|
} |
1541
|
16 |
|
$value = str_pad(substr($start, 0, $numerics), 4, 0, STR_PAD_LEFT).substr($value, $numerics); |
1542
|
|
|
|
1543
|
16 |
|
parent::setTransactionId($value); |
1544
|
16 |
|
} |
1545
|
|
|
|
1546
|
3 |
|
public function getData() |
1547
|
|
|
{ |
1548
|
3 |
|
$this->validate('merchantId', 'terminalId', 'amount', 'currency'); |
1549
|
|
|
|
1550
|
|
|
return array( |
1551
|
|
|
// mandatory fields |
1552
|
3 |
|
'Ds_Merchant_MerchantCode' => $this->getMerchantId(), |
1553
|
3 |
|
'Ds_Merchant_Terminal' => $this->getTerminalId(), |
1554
|
3 |
|
'Ds_Merchant_TransactionType' => '0', // Authorisation |
1555
|
3 |
|
'Ds_Merchant_Amount' => $this->getAmountInteger(), |
1556
|
3 |
|
'Ds_Merchant_Currency' => $this->getCurrencyNumeric(), // uses ISO-4217 codes |
1557
|
3 |
|
'Ds_Merchant_Order' => $this->getTransactionId(), |
1558
|
3 |
|
'Ds_Merchant_MerchantUrl' => $this->getNotifyUrl(), |
1559
|
|
|
// optional fields |
1560
|
3 |
|
'Ds_Merchant_ProductDescription' => $this->getDescription(), |
1561
|
3 |
|
'Ds_Merchant_Cardholder' => $this->getCardholder(), |
1562
|
3 |
|
'Ds_Merchant_UrlOK' => $this->getReturnUrl(), |
1563
|
3 |
|
'Ds_Merchant_UrlKO' => $this->getReturnUrl(), |
1564
|
3 |
|
'Ds_Merchant_MerchantName' => $this->getMerchantName(), |
1565
|
3 |
|
'Ds_Merchant_ConsumerLanguage' => $this->getConsumerLanguage(), |
1566
|
3 |
|
'Ds_Merchant_MerchantData' => $this->getMerchantData(), |
1567
|
|
|
// 3DS EMV fields |
1568
|
|
|
'Ds_Merchant_Emv3Ds' => [ |
1569
|
3 |
|
'cardholderName' => $this->getCardholder(), |
1570
|
3 |
|
'email' => $this->getEmail(), |
1571
|
|
|
'homePhone' => [ |
1572
|
3 |
|
'cc' => $this->getHomePhoneCountryPrefix(), |
1573
|
3 |
|
'subscriber' => $this->getHomePhone(), |
1574
|
|
|
], |
1575
|
|
|
'mobilePhone' => [ |
1576
|
3 |
|
'cc' => $this->getMobilePhoneCountryPrefix(), |
1577
|
3 |
|
'subscriber' => $this->getMobilePhone(), |
1578
|
|
|
], |
1579
|
|
|
'workPhone' => [ |
1580
|
3 |
|
'cc' => $this->getWorkPhoneCountryPrefix(), |
1581
|
3 |
|
'subscriber' => $this->getWorkPhone(), |
1582
|
|
|
], |
1583
|
3 |
|
'shipAddrLine1' => $this->getShippingAddress1(), |
1584
|
3 |
|
'shipAddrLine2' => $this->getShippingAddress2(), |
1585
|
3 |
|
'shipAddrLine3' => $this->getShippingAddress3(), |
1586
|
3 |
|
'shipAddrCity' => $this->getShippingCity(), |
1587
|
3 |
|
'shipAddrPostCode' => $this->getShippingPostcode(), |
1588
|
3 |
|
'shipAddrState' => $this->getShippingState(), |
1589
|
3 |
|
'shipAddrCountry' => $this->getShippingCountry(), |
1590
|
3 |
|
'addrMatch' => $this->getAddressMatch() ? "Y" : "N", |
1591
|
3 |
|
'billAddrLine1' => $this->getBillingAddress1(), |
1592
|
3 |
|
'billAddrLine2' => $this->getBillingAddress2(), |
1593
|
3 |
|
'billAddrLine3' => $this->getBillingAddress3(), |
1594
|
3 |
|
'billAddrCity' => $this->getBillingCity(), |
1595
|
3 |
|
'billAddrPostCode' => $this->getBillingPostcode(), |
1596
|
3 |
|
'billAddrState' => $this->getBillingState(), |
1597
|
3 |
|
'billAddrCountry' => $this->getBillingCountry(), |
1598
|
3 |
|
'challengeWindowSize' => $this->getChallengeWindowSize(), |
1599
|
3 |
|
'acctID' => $this->getCustomerAdditionalInformation(), |
1600
|
|
|
'threeDSRequestorAuthenticationInfo' => [ |
1601
|
3 |
|
'threeDSReqAuthData' => $this->get3DsRequestAuthenticationMethodData(), |
1602
|
3 |
|
'threeDSReqAuthMethod' => $this->get3DsRequestAuthenticationMethod(), |
1603
|
3 |
|
'threeDSReqAuthTimestamp' => $this->formatDateTime( |
1604
|
3 |
|
$this->get3DsRequestAuthenticationTime(), |
1605
|
3 |
|
"YmdHi" |
1606
|
|
|
), |
1607
|
|
|
], |
1608
|
|
|
'acctInfo' => [ |
1609
|
3 |
|
'chAccAgeInd' => $this->getCustomerAccountCreationIndicator(), |
1610
|
3 |
|
'chAccDate' => $this->formatDateTime($this->getCustomerAccountCreationDate(), "Ymd"), |
1611
|
3 |
|
'chAccChangeInd' => $this->getCustomerAccountModificationIndicator(), |
1612
|
3 |
|
'chAccChange' => $this->formatDateTime( |
1613
|
3 |
|
$this->getCustomerAccountModificationDate(), |
1614
|
3 |
|
"Ymd" |
1615
|
|
|
), |
1616
|
3 |
|
'chAccPwChangeInd' => $this->getCustomerPasswordModificationIndicator(), |
1617
|
3 |
|
'chAccPwChange' => $this->formatDateTime( |
1618
|
3 |
|
$this->getCustomerPasswordModificationDate(), |
1619
|
3 |
|
"Ymd" |
1620
|
|
|
), |
1621
|
3 |
|
'nbPurchaseAccount' => $this->getCustomerPurchasesInLast6Months(), |
1622
|
3 |
|
'provisionAttemptsDay' => $this->getCustomerAccountCardProvisionsLast24Hours(), |
1623
|
3 |
|
'txnActivityDay' => $this->getCustomerAccountTransactionsLast24Hours(), |
1624
|
3 |
|
'txnActivityYear' => $this->getCustomerAccountTransactionsLastYear(), |
1625
|
3 |
|
'paymentAccInd' => $this->getCustomerPaymentMethodCreationIndicator(), |
1626
|
3 |
|
'paymentAccAge' => $this->formatDateTime( |
1627
|
3 |
|
$this->getCustomerPaymentMethodCreationDate(), |
1628
|
3 |
|
"Ymd" |
1629
|
|
|
), |
1630
|
3 |
|
'shipAddressUsageInd' => $this->getShippingAddressFirstUsedIndicator(), |
1631
|
3 |
|
'shipAddressUsage' => $this->formatDateTime($this->getShippingAddressFirstUsedDate(), "Ymd"), |
1632
|
3 |
|
'shipNameIndicator' => $this->getShippingNameCustomerNameMatch() ? "01" : "02", |
1633
|
3 |
|
'suspiciousAccActivity' => $this->getCustomerHasSuspiciousActivity() ? "02" : "01", |
1634
|
|
|
], |
1635
|
|
|
'merchantRiskIndicator' => [ |
1636
|
3 |
|
'deliveryEmailAddress' => $this->getDeliveryEmail(), |
1637
|
3 |
|
'deliveryTimeframe' => $this->getDeliveryTimeframeIndicator(), |
1638
|
3 |
|
'giftCardAmount' => $this->getGiftCardAmount() === null |
1639
|
|
|
? null |
1640
|
3 |
|
: (int) $this->getGiftCardAmount(), |
1641
|
3 |
|
'giftCardCount' => $this->getGiftCardCount(), |
1642
|
3 |
|
'giftCardCurr' => $this->getGiftCardCurrency(), |
1643
|
3 |
|
'preOrderPurchaseInd' => $this->getPurchasingPreOrder() ? "02" : "01", |
1644
|
3 |
|
'preOrderDate' => $this->formatDateTime($this->getPreOrderDate(), "Ymd"), |
1645
|
3 |
|
'reorderItemsInd' => $this->getCustomerHasPurchasedProductBefore() ? "02" : "01", |
1646
|
3 |
|
'shipIndicator' => $this->getShippingAddressIndicator(), |
1647
|
|
|
], |
1648
|
|
|
], |
1649
|
|
|
); |
1650
|
|
|
} |
1651
|
|
|
|
1652
|
1 |
|
public function sendData($data) |
1653
|
|
|
{ |
1654
|
1 |
|
$security = new Security; |
1655
|
|
|
|
1656
|
1 |
|
$encoded_data = $security->encodeMerchantParameters($data); |
1657
|
|
|
|
1658
|
|
|
$response_data = array( |
1659
|
1 |
|
'Ds_SignatureVersion' => Security::VERSION, |
1660
|
1 |
|
'Ds_MerchantParameters' => $encoded_data, |
1661
|
1 |
|
'Ds_Signature' => $security->createSignature( |
1662
|
1 |
|
$encoded_data, |
1663
|
1 |
|
$data['Ds_Merchant_Order'], |
1664
|
1 |
|
$this->getHmacKey() |
1665
|
|
|
), |
1666
|
|
|
); |
1667
|
|
|
|
1668
|
1 |
|
return $this->response = new PurchaseResponse($this, $response_data); |
1669
|
|
|
} |
1670
|
|
|
|
1671
|
7 |
|
public function getEndpoint() |
1672
|
|
|
{ |
1673
|
7 |
|
return $this->getTestMode() ? $this->testEndpoint : $this->liveEndpoint; |
1674
|
|
|
} |
1675
|
|
|
|
1676
|
|
|
/** |
1677
|
|
|
* Convert a DateTime or timestamp to a formatted date. |
1678
|
|
|
* |
1679
|
|
|
* @param DateTime|int $date The date to format. |
1680
|
|
|
* @param string $format The format to use. |
1681
|
|
|
* |
1682
|
|
|
* @return string|null The formatted date, or null if date isn't a timestamp or DateTime object. |
1683
|
|
|
*/ |
1684
|
3 |
|
protected static function formatDateTime($date, $format) |
1685
|
|
|
{ |
1686
|
3 |
|
if (is_int($date)) { |
1687
|
1 |
|
return date($format, $date); |
1688
|
3 |
|
} elseif ($date instanceof DateTime) { |
1689
|
1 |
|
return $date->format($format); |
1690
|
|
|
} |
1691
|
2 |
|
} |
1692
|
|
|
} |
1693
|
|
|
|