diff --git a/tests/ProGatewayTest.php b/tests/ProGatewayTest.php index fee8568..6c6b074 100644 --- a/tests/ProGatewayTest.php +++ b/tests/ProGatewayTest.php @@ -86,6 +86,26 @@ public function testReferencePurchaseSuccess() $this->assertEquals('A10A6AE7042E', $response->getTransactionReference()); } + public function testReferencePurchaseWithCvvSuccess() + { + $options = array( + 'amount' => '10.00', + 'cardReference' => 'abc123', + 'card' => new CreditCard(array( + 'cvv' => '123', + )), + ); + + $this->setMockHttpResponse('PurchaseSuccess.txt'); + + $request = $this->gateway->purchase($options); + $response = $request->send(); + + $this->assertArrayHasKey('CVV2', $request->getData()); + $this->assertTrue($response->isSuccessful()); + $this->assertEquals('A10A6AE7042E', $response->getTransactionReference()); + } + public function testPurchaseError() { $this->setMockHttpResponse('PurchaseFailure.txt');