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

Commit

Permalink
Adds full lookup functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 21, 2016
1 parent bee4951 commit 47fe252
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ public function valid()

break;
case 'res_delete':
case 'res_lookup_full':
case 'res_lookup_masked':
$errors[] = Validator::set($params, 'data_key') ? null : 'Data key not provided.';

Expand Down
5 changes: 3 additions & 2 deletions src/Vault.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ public static function create(string $id, string $token, string $environment)
* profile associated with a given data key.
*
* @param string $key
* @param bool $full
*
* @return \CraigPaul\Moneris\Response
*/
public function peek(string $key)
public function peek(string $key, bool $full = false)
{
$params = [
'type' => 'res_lookup_masked',
'type' => $full ? 'res_lookup_full' : 'res_lookup_masked',
'data_key' => $key,
];

Expand Down

0 comments on commit 47fe252

Please sign in to comment.