From f9f92565b09ee7971212616c92d439cc1fd4fa62 Mon Sep 17 00:00:00 2001 From: Craig Paul Date: Thu, 20 Oct 2016 07:54:21 -0600 Subject: [PATCH] Adds avs and cvd tests --- tests/ProcessorTest.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/ProcessorTest.php b/tests/ProcessorTest.php index c5cb083..8dc1035 100644 --- a/tests/ProcessorTest.php +++ b/tests/ProcessorTest.php @@ -69,4 +69,38 @@ public function it_can_submit_a_proper_request_to_the_moneris_api() $this->assertTrue($response->successful); } + + /** @test */ + public function it_can_submit_a_avs_secured_request_to_the_moneris_api() + { + $params = ['environment' => Moneris::ENV_TESTING, 'avs' => true]; + $gateway = Moneris::create($this->id, $this->token, $params)->connect(); + $response = $gateway->purchase([ + 'order_id' => uniqid('1234-56789', true), + 'amount' => '1.00', + 'credit_card' => $this->visa, + 'expdate' => '2012', + 'avs_street_number' => '123', + 'avs_street_name' => 'Fake Street', + 'avs_zipcode' => 'X0X0X0', + ]); + + $this->assertTrue($response->successful); + } + + /** @test */ + public function it_can_submit_a_cvd_secured_request_to_the_moneris_api() + { + $params = ['environment' => Moneris::ENV_TESTING, 'cvd' => true]; + $gateway = Moneris::create($this->id, $this->token, $params)->connect(); + $response = $gateway->purchase([ + 'order_id' => uniqid('1234-56789', true), + 'amount' => '1.00', + 'credit_card' => $this->visa, + 'expdate' => '2012', + 'cvd' => '111' + ]); + + $this->assertTrue($response->successful); + } } \ No newline at end of file