Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Adds avs and cvd tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 20, 2016
1 parent b905798 commit f9f9256
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/ProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit f9f9256

Please sign in to comment.