diff --git a/README.md b/README.md index 3519178..3e64b97 100644 --- a/README.md +++ b/README.md @@ -341,7 +341,7 @@ $response = $vault->tokenize($response->transaction); ### Peek Into The Vault -If you have the need to look up the masked credit card number, or perhaps the full credit card number, you can peek into the Vault. +If you have the need to look up the masked credit card number you can peek into the Vault. ```php $card = CreditCard::create('4242424242424242', '2012'); @@ -353,8 +353,6 @@ $response = $vault->peek($key); $receipt = $response->receipt(); $masked = $receipt->read('data')['masked_pan']; - -$full = $receipt->read('data')['pan']; ``` ### Retrieve Expiring Cards @@ -552,4 +550,4 @@ Moneris API is open-sourced software licensed under the [MIT license](https://op [link-travis]: https://travis-ci.org/craigpaul/moneris-api [link-downloads]: https://packagist.org/packages/craigpaul/moneris-api [link-author]: https://github.com/craigpaul -[link-contributors]: ../../contributors \ No newline at end of file +[link-contributors]: ../../contributors diff --git a/src/Vault.php b/src/Vault.php index 23aeee1..de28d6d 100644 --- a/src/Vault.php +++ b/src/Vault.php @@ -109,14 +109,13 @@ public function expiring() * profile associated with a given data key. * * @param string $key - * @param bool $full * * @return \CraigPaul\Moneris\Response */ - public function peek($key = '', $full = false) + public function peek($key = '') { $params = [ - 'type' => $full ? 'res_lookup_full' : 'res_lookup_masked', + 'type' => 'res_lookup_masked', 'data_key' => $key, ]; diff --git a/tests/VaultTest.php b/tests/VaultTest.php index 7f52730..9a3c558 100644 --- a/tests/VaultTest.php +++ b/tests/VaultTest.php @@ -251,22 +251,6 @@ public function it_can_peek_into_the_vault_and_retrieve_a_masked_credit_card_fro $this->assertEquals($end, substr($receipt->read('data')['masked_pan'], -4, 4)); } - /** @test */ - public function it_can_peek_into_the_vault_and_retrieve_a_full_credit_card_from_the_moneris_vault_with_a_valid_data_key() - { - $response = $this->vault->add($this->card); - $key = $response->receipt()->read('key'); - - $response = $this->vault->peek($key, true); - $receipt = $response->receipt(); - - $this->assertTrue($response->successful); - $this->assertNotNull($receipt->read('key')); - $this->assertEquals('12', $receipt->read('data')['expiry_date']['month']); - $this->assertEquals('20', $receipt->read('data')['expiry_date']['year']); - $this->assertEquals($this->visa, $receipt->read('data')['pan']); - } - /** @test */ public function it_can_retrieve_all_expiring_credit_cards_from_the_moneris_vault() { @@ -488,4 +472,4 @@ public function it_can_capture_a_pre_authorized_credit_card_stored_in_the_moneri $this->assertTrue($response->successful); $this->assertEquals(true, $receipt->read('complete')); } -} \ No newline at end of file +}