From 54b995da5541ad045acbe6fb53512707a90f0679 Mon Sep 17 00:00:00 2001 From: Craig Paul Date: Sun, 23 Oct 2016 08:31:48 -0600 Subject: [PATCH] Adds cvd purchase test --- tests/GatewayTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/GatewayTest.php b/tests/GatewayTest.php index c79e84f..61c7986 100644 --- a/tests/GatewayTest.php +++ b/tests/GatewayTest.php @@ -68,6 +68,24 @@ public function it_can_make_a_purchase_and_receive_a_response() $this->assertTrue($response->successful); } + /** @test */ + public function it_can_make_a_cvd_secured_purchase_and_receive_a_response() + { + $params = ['environment' => $this->environment, 'cvd' => true]; + $gateway = Moneris::create($this->id, $this->token, $params); + $params = [ + 'cvd' => '111', + 'order_id' => uniqid('1234-56789', true), + 'amount' => '1.00', + 'credit_card' => $this->visa, + 'expdate' => '2012', + ]; + $response = $gateway->purchase($params); + + $this->assertEquals(Response::class, get_class($response)); + $this->assertTrue($response->successful); + } + /** @test */ public function it_can_pre_authorize_a_purchase_and_receive_a_response() {