From c8706c3944be56d15485705c0919bdbddef1cbc2 Mon Sep 17 00:00:00 2001 From: Avik Aghajanyan Date: Fri, 25 May 2018 13:21:36 +0400 Subject: [PATCH 1/4] Added not found exception --- src/Common/Exception/NotFoundException.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/Common/Exception/NotFoundException.php diff --git a/src/Common/Exception/NotFoundException.php b/src/Common/Exception/NotFoundException.php new file mode 100644 index 00000000..52d9cef4 --- /dev/null +++ b/src/Common/Exception/NotFoundException.php @@ -0,0 +1,16 @@ + Date: Fri, 25 May 2018 13:36:26 +0400 Subject: [PATCH 2/4] Added new line at the end of the file --- src/Common/Exception/NotFoundException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/Exception/NotFoundException.php b/src/Common/Exception/NotFoundException.php index 52d9cef4..a60f3100 100644 --- a/src/Common/Exception/NotFoundException.php +++ b/src/Common/Exception/NotFoundException.php @@ -13,4 +13,4 @@ public function __construct($message = "Resource not found on payment gateway", { parent::__construct($message, $code, $previous); } -} \ No newline at end of file +} From 13a5dcbcd4557763247798a9c0711234923acec6 Mon Sep 17 00:00:00 2001 From: Avik Aghajanyan Date: Fri, 25 May 2018 14:00:51 +0400 Subject: [PATCH 3/4] Error code changed to 0 --- src/Common/Exception/NotFoundException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/Exception/NotFoundException.php b/src/Common/Exception/NotFoundException.php index a60f3100..68f59fea 100644 --- a/src/Common/Exception/NotFoundException.php +++ b/src/Common/Exception/NotFoundException.php @@ -9,7 +9,7 @@ */ class NotFoundException extends \Exception implements OmnipayException { - public function __construct($message = "Resource not found on payment gateway", $code = 404, $previous = null) + public function __construct($message = "Resource not found on payment gateway", $code = 0, $previous = null) { parent::__construct($message, $code, $previous); } From 75c2ff65084fe16da2bff22dad8e70faa4867d0b Mon Sep 17 00:00:00 2001 From: Avik Aghajanyan Date: Fri, 25 May 2018 14:35:49 +0400 Subject: [PATCH 4/4] NotFoundException renamed to ResourceNotFounException --- .../{NotFoundException.php => ResourceNotFoundException.php} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/Common/Exception/{NotFoundException.php => ResourceNotFoundException.php} (73%) diff --git a/src/Common/Exception/NotFoundException.php b/src/Common/Exception/ResourceNotFoundException.php similarity index 73% rename from src/Common/Exception/NotFoundException.php rename to src/Common/Exception/ResourceNotFoundException.php index 68f59fea..58dca467 100644 --- a/src/Common/Exception/NotFoundException.php +++ b/src/Common/Exception/ResourceNotFoundException.php @@ -3,11 +3,11 @@ namespace Omnipay\Common\Exception; /** - * Not Found Exception + * Resource Not Found Exception * * Thrown when the requested resource is not found on payment gateway */ -class NotFoundException extends \Exception implements OmnipayException +class ResourceNotFoundException extends \Exception implements OmnipayException { public function __construct($message = "Resource not found on payment gateway", $code = 0, $previous = null) {