From 3e6358b3aa81f7ab7520bd9be5a23cdd079d69f1 Mon Sep 17 00:00:00 2001 From: Craig Paul Date: Fri, 21 Oct 2016 15:23:51 -0600 Subject: [PATCH] Adds get expiring functionality --- src/Transaction.php | 2 ++ src/Vault.php | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Transaction.php b/src/Transaction.php index 9b52861..1d60d24 100644 --- a/src/Transaction.php +++ b/src/Transaction.php @@ -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': diff --git a/src/Vault.php b/src/Vault.php index d7ac3b5..71a6a09 100644 --- a/src/Vault.php +++ b/src/Vault.php @@ -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.