File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,26 @@ public function testReferencePurchaseSuccess()
86
86
$ this ->assertEquals ('A10A6AE7042E ' , $ response ->getTransactionReference ());
87
87
}
88
88
89
+ public function testReferencePurchaseWithCvvSuccess ()
90
+ {
91
+ $ options = array (
92
+ 'amount ' => '10.00 ' ,
93
+ 'cardReference ' => 'abc123 ' ,
94
+ 'card ' => new CreditCard (array (
95
+ 'cvv ' => '123 ' ,
96
+ )),
97
+ );
98
+
99
+ $ this ->setMockHttpResponse ('PurchaseSuccess.txt ' );
100
+
101
+ $ request = $ this ->gateway ->purchase ($ options );
102
+ $ response = $ request ->send ();
103
+
104
+ $ this ->assertArrayHasKey ('CVV2 ' , $ request ->getData ());
105
+ $ this ->assertTrue ($ response ->isSuccessful ());
106
+ $ this ->assertEquals ('A10A6AE7042E ' , $ response ->getTransactionReference ());
107
+ }
108
+
89
109
public function testPurchaseError ()
90
110
{
91
111
$ this ->setMockHttpResponse ('PurchaseFailure.txt ' );
You can’t perform that action at this time.
0 commit comments