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.