diff --git a/tests/VaultTest.php b/tests/VaultTest.php index 97ad083..4796783 100644 --- a/tests/VaultTest.php +++ b/tests/VaultTest.php @@ -240,4 +240,22 @@ public function it_can_submit_an_avs_secured_purchase_with_a_credit_card_stored_ $this->assertEquals($key, $receipt->DataKey); $this->assertEquals('true', $receipt->Complete); } + + /** @test */ + public function it_can_pre_authorize_a_credit_card_stored_in_the_moneris_vault() + { + $response = $this->vault->add($this->card); + $key = $response->receipt()->DataKey; + + $params = array_merge($this->params, [ + 'data_key' => $key, + ]); + + $response = $this->vault->preauth($params); + $receipt = $response->receipt(); + + $this->assertTrue($response->successful); + $this->assertEquals($key, $receipt->DataKey); + $this->assertEquals('true', $receipt->Complete); + } } \ No newline at end of file