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

Commit

Permalink
Adds get expiring functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 21, 2016
1 parent 4a7947b commit 3e6358b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ public function valid()

if (isset($params['type'])) {
switch ($params['type']) {
case 'res_get_expiring':
break;
case 'card_verification':
case 'preauth':
case 'purchase':
Expand Down
14 changes: 14 additions & 0 deletions src/Vault.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ public static function create(string $id, string $token, string $environment)
return new static($id, $token, $environment);
}

/**
* Get all expiring credit cards from the Moneris Vault.
*
* @return \CraigPaul\Moneris\Response
*/
public function expiring()
{
$params = ['type' => 'res_get_expiring'];

$transaction = $this->transaction($params);

return $this->process($transaction);
}

/**
* Peek into the Moneris Vault and retrieve a credit card
* profile associated with a given data key.
Expand Down

0 comments on commit 3e6358b

Please sign in to comment.