From 257756966ac7e31c905c7ea79b3f23d0aa726edd Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 11 Jan 2021 17:59:58 +1300 Subject: [PATCH] Add default method for getCardReference This adds a getCardReference stub method so that functions that interact with Omnipay don't need to know whether the function exists (and can take action based on whether they return a value rather than on method_exists) --- src/Common/Message/AbstractResponse.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Common/Message/AbstractResponse.php b/src/Common/Message/AbstractResponse.php index e958f4b2..95d5a833 100644 --- a/src/Common/Message/AbstractResponse.php +++ b/src/Common/Message/AbstractResponse.php @@ -146,6 +146,20 @@ public function getTransactionReference() return null; } + /** + * Gateway Card Reference + * + * @return null|string A reference sometimes provided by the gateway + * representing a tokenized or otherwise stored card. + * + * If this is returned it can be re-used in place of card details in + * subsequent transactions. + */ + public function getCardReference() + { + return null; + } + /** * Get the transaction ID as generated by the merchant website. *