summaryrefslogtreecommitdiffstats
path: root/vendor/stripe/stripe-php/lib/Exception/OAuth
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/stripe/stripe-php/lib/Exception/OAuth')
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php10
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidClientException.php12
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php13
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidRequestException.php11
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidScopeException.php10
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/OAuthErrorException.php19
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php12
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php11
-rw-r--r--vendor/stripe/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php11
9 files changed, 109 insertions, 0 deletions
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php
new file mode 100644
index 0000000..dd42662
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * The base interface for all Stripe OAuth exceptions.
+ */
+interface ExceptionInterface extends \Stripe\Exception\ExceptionInterface
+{
+}
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidClientException.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidClientException.php
new file mode 100644
index 0000000..1393451
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidClientException.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * InvalidClientException is thrown when the client_id does not belong to you,
+ * the stripe_user_id does not exist or is not connected to your application,
+ * or the API key mode (live or test mode) does not match the client_id mode.
+ */
+class InvalidClientException extends OAuthErrorException
+{
+}
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php
new file mode 100644
index 0000000..898b3a7
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * InvalidGrantException is thrown when a specified code doesn't exist, is
+ * expired, has been used, or doesn't belong to you; a refresh token doesn't
+ * exist, or doesn't belong to you; or if an API key's mode (live or test)
+ * doesn't match the mode of a code or refresh token.
+ */
+class InvalidGrantException extends OAuthErrorException
+{
+}
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidRequestException.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidRequestException.php
new file mode 100644
index 0000000..59dac7c
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidRequestException.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * InvalidRequestException is thrown when a code, refresh token, or grant
+ * type parameter is not provided, but was required.
+ */
+class InvalidRequestException extends OAuthErrorException
+{
+}
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidScopeException.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidScopeException.php
new file mode 100644
index 0000000..091729d
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidScopeException.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * InvalidScopeException is thrown when an invalid scope parameter is provided.
+ */
+class InvalidScopeException extends OAuthErrorException
+{
+}
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/OAuthErrorException.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/OAuthErrorException.php
new file mode 100644
index 0000000..bded3c8
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/OAuthErrorException.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * Implements properties and methods common to all (non-SPL) Stripe OAuth
+ * exceptions.
+ */
+abstract class OAuthErrorException extends \Stripe\Exception\ApiErrorException
+{
+ protected function constructErrorObject()
+ {
+ if (null === $this->jsonBody) {
+ return null;
+ }
+
+ return \Stripe\OAuthErrorObject::constructFrom($this->jsonBody);
+ }
+}
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php
new file mode 100644
index 0000000..c8dba29
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * UnknownApiErrorException is thrown when the client library receives an
+ * error from the OAuth API it doesn't know about. Receiving this error usually
+ * means that your client library is outdated and should be upgraded.
+ */
+class UnknownOAuthErrorException extends OAuthErrorException
+{
+}
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php
new file mode 100644
index 0000000..418635d
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * UnsupportedGrantTypeException is thrown when an unuspported grant type
+ * parameter is specified.
+ */
+class UnsupportedGrantTypeException extends OAuthErrorException
+{
+}
diff --git a/vendor/stripe/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php b/vendor/stripe/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php
new file mode 100644
index 0000000..26742a8
--- /dev/null
+++ b/vendor/stripe/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace Stripe\Exception\OAuth;
+
+/**
+ * UnsupportedResponseTypeException is thrown when an unsupported response type
+ * parameter is specified.
+ */
+class UnsupportedResponseTypeException extends OAuthErrorException
+{
+}