-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestCards.php
71 lines (55 loc) · 2.33 KB
/
TestCards.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
namespace Wrapper;
use Wrapper\Objects\Card;
class TestCards
{
public static function visaNon3DSecure($successful = true): Card
{
$year = date('Y', strtotime("+2 years"));
if ($successful) {
return new Card('Joe Soap', '4111111111111111', '09', $year, '123');
} else return new Card('Joe Soap', '4242424242424242', '09', $year, '123');
}
public static function visa3DSecure($successful = true): Card
{
$year = date('Y', strtotime("+2 years"));
if ($successful) {
return new Card('Joe Soap', '4000000000000002', '09', $year, '123');
} else return new Card('Joe Soap', '4000000000000010', '09', $year, '123');
}
public static function mastercard3DSecure($successful = true): Card
{
$year = date('Y', strtotime("+2 years"));
if ($successful) {
return new Card('Joe Soap', '5200000000000007', '09', $year, '123');
} else return new Card('Joe Soap', '5200000000000023', '09', $year, '123');
}
public static function mastercardNon3DSecure($successful = true): Card
{
$year = date('Y', strtotime("+2 years"));
if ($successful) {
return new Card('Joe Soap', '5100080000000000', '09', $year, '123');
} else return new Card('Joe Soap', '5404000000000001', '09', $year, '123');
}
public static function amexNon3DSecure($successful = true): Card
{
$year = date('Y', strtotime("+2 years"));
if ($successful) {
return new Card('Joe Soap', '370000200000000', '09', $year, '123');
} else return new Card('Joe Soap', '374200000000004', '09', $year, '123');
}
public static function dinersNon3DSecure($successful = true): Card
{
$year = date('Y', strtotime("+2 years"));
if ($successful) {
return new Card('Joe Soap', '36135005437019', '09', $year, '123');
} else return new Card('Joe Soap', '36135182434011', '09', $year, '123');
}
public static function maestroNon3DSecure($successful = true): Card
{
$year = date('Y', strtotime("+2 years"));
if ($successful) {
return new Card('Joe Soap', '5641821111166669', '09', $year, '123');
} else return new Card('Joe Soap', '6759411100000008', '09', $year, '123');
}
}