@@ -31,6 +31,10 @@ public function testAuthorizeSuccess()
3131 $ this ->assertTrue ($ response ->isSuccessful ());
3232 $ this ->assertSame ('2184493132 ' , $ response ->getTransactionReference ());
3333 $ 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 ());
3438 }
3539
3640 public function testAuthorizeFailure ()
@@ -41,6 +45,10 @@ public function testAuthorizeFailure()
4145 $ this ->assertFalse ($ response ->isSuccessful ());
4246 $ this ->assertSame ('0 ' , $ response ->getTransactionReference ());
4347 $ 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 ());
4452 }
4553
4654 public function testCaptureSuccess ()
@@ -51,6 +59,10 @@ public function testCaptureSuccess()
5159 $ this ->assertTrue ($ response ->isSuccessful ());
5260 $ this ->assertSame ('2184494531 ' , $ response ->getTransactionReference ());
5361 $ 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 ());
5466 }
5567
5668 public function testCaptureFailure ()
@@ -61,6 +73,10 @@ public function testCaptureFailure()
6173 $ this ->assertFalse ($ response ->isSuccessful ());
6274 $ this ->assertSame ('0 ' , $ response ->getTransactionReference ());
6375 $ 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 ());
6480 }
6581
6682 public function testPurchaseSuccess ()
@@ -71,6 +87,10 @@ public function testPurchaseSuccess()
7187 $ this ->assertTrue ($ response ->isSuccessful ());
7288 $ this ->assertSame ('2184492509 ' , $ response ->getTransactionReference ());
7389 $ 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 ());
7494 }
7595
7696 public function testPurchaseFailure ()
@@ -81,5 +101,9 @@ public function testPurchaseFailure()
81101 $ this ->assertFalse ($ response ->isSuccessful ());
82102 $ this ->assertSame ('0 ' , $ response ->getTransactionReference ());
83103 $ 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 ());
84108 }
85109}
0 commit comments