From 81cd6f63001107ae5b15f6f05912d2283751c4f6 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Thu, 4 Dec 2014 13:03:39 +0100 Subject: [PATCH] Add isCancelled to ResponseInterface As discussed in https://github.com/thephpleague/omnipay/issues/202 --- src/Omnipay/Common/Message/AbstractResponse.php | 5 +++++ src/Omnipay/Common/Message/ResponseInterface.php | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/Omnipay/Common/Message/AbstractResponse.php b/src/Omnipay/Common/Message/AbstractResponse.php index a67dbbc4..e968d709 100644 --- a/src/Omnipay/Common/Message/AbstractResponse.php +++ b/src/Omnipay/Common/Message/AbstractResponse.php @@ -35,6 +35,11 @@ public function isTransparentRedirect() return false; } + public function isCancelled() + { + return false; + } + public function getData() { return $this->data; diff --git a/src/Omnipay/Common/Message/ResponseInterface.php b/src/Omnipay/Common/Message/ResponseInterface.php index 495ed183..98baa408 100644 --- a/src/Omnipay/Common/Message/ResponseInterface.php +++ b/src/Omnipay/Common/Message/ResponseInterface.php @@ -28,6 +28,13 @@ public function isSuccessful(); */ public function isRedirect(); + /** + * Is the transaction cancelled by the user? + * + * @return boolean + */ + public function isCancelled(); + /** * Response Message *