@@ -31,6 +31,10 @@ public function testAuthorizeSuccess()
31
31
$ this ->assertTrue ($ response ->isSuccessful ());
32
32
$ this ->assertSame ('2184493132 ' , $ response ->getTransactionReference ());
33
33
$ this ->assertSame ('This transaction has been approved. ' , $ response ->getMessage ());
34
+ $ this ->assertSame ('1 ' , $ response ->getCode ());
35
+ $ this ->assertSame ('1 ' , $ response ->getReasonCode ());
36
+ $ this ->assertSame ('GA4OQP ' , $ response ->getAuthorizationCode ());
37
+ $ this ->assertSame ('Y ' , $ response ->getAVSCode ());
34
38
}
35
39
36
40
public function testAuthorizeFailure ()
@@ -41,6 +45,10 @@ public function testAuthorizeFailure()
41
45
$ this ->assertFalse ($ response ->isSuccessful ());
42
46
$ this ->assertSame ('0 ' , $ response ->getTransactionReference ());
43
47
$ this ->assertSame ('A valid amount is required. ' , $ response ->getMessage ());
48
+ $ this ->assertSame ('3 ' , $ response ->getCode ());
49
+ $ this ->assertSame ('5 ' , $ response ->getReasonCode ());
50
+ $ this ->assertSame ('' , $ response ->getAuthorizationCode ());
51
+ $ this ->assertSame ('P ' , $ response ->getAVSCode ());
44
52
}
45
53
46
54
public function testCaptureSuccess ()
@@ -51,6 +59,10 @@ public function testCaptureSuccess()
51
59
$ this ->assertTrue ($ response ->isSuccessful ());
52
60
$ this ->assertSame ('2184494531 ' , $ response ->getTransactionReference ());
53
61
$ this ->assertSame ('This transaction has been approved. ' , $ response ->getMessage ());
62
+ $ this ->assertSame ('1 ' , $ response ->getCode ());
63
+ $ this ->assertSame ('1 ' , $ response ->getReasonCode ());
64
+ $ this ->assertSame ('F51OYG ' , $ response ->getAuthorizationCode ());
65
+ $ this ->assertSame ('P ' , $ response ->getAVSCode ());
54
66
}
55
67
56
68
public function testCaptureFailure ()
@@ -61,6 +73,10 @@ public function testCaptureFailure()
61
73
$ this ->assertFalse ($ response ->isSuccessful ());
62
74
$ this ->assertSame ('0 ' , $ response ->getTransactionReference ());
63
75
$ this ->assertSame ('The transaction cannot be found. ' , $ response ->getMessage ());
76
+ $ this ->assertSame ('3 ' , $ response ->getCode ());
77
+ $ this ->assertSame ('16 ' , $ response ->getReasonCode ());
78
+ $ this ->assertSame ('' , $ response ->getAuthorizationCode ());
79
+ $ this ->assertSame ('P ' , $ response ->getAVSCode ());
64
80
}
65
81
66
82
public function testPurchaseSuccess ()
@@ -71,6 +87,10 @@ public function testPurchaseSuccess()
71
87
$ this ->assertTrue ($ response ->isSuccessful ());
72
88
$ this ->assertSame ('2184492509 ' , $ response ->getTransactionReference ());
73
89
$ this ->assertSame ('This transaction has been approved. ' , $ response ->getMessage ());
90
+ $ this ->assertSame ('1 ' , $ response ->getCode ());
91
+ $ this ->assertSame ('1 ' , $ response ->getReasonCode ());
92
+ $ this ->assertSame ('JE6JM1 ' , $ response ->getAuthorizationCode ());
93
+ $ this ->assertSame ('Y ' , $ response ->getAVSCode ());
74
94
}
75
95
76
96
public function testPurchaseFailure ()
@@ -81,5 +101,9 @@ public function testPurchaseFailure()
81
101
$ this ->assertFalse ($ response ->isSuccessful ());
82
102
$ this ->assertSame ('0 ' , $ response ->getTransactionReference ());
83
103
$ this ->assertSame ('A valid amount is required. ' , $ response ->getMessage ());
104
+ $ this ->assertSame ('3 ' , $ response ->getCode ());
105
+ $ this ->assertSame ('5 ' , $ response ->getReasonCode ());
106
+ $ this ->assertSame ('' , $ response ->getAuthorizationCode ());
107
+ $ this ->assertSame ('P ' , $ response ->getAVSCode ());
84
108
}
85
109
}
0 commit comments