Skip to content

Commit

Permalink
Add ProcessOutExceptionInterface. Fixes #8.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Huez authored and Manuel Huez committed Apr 20, 2018
1 parent 5a8050d commit 3556ee1
Show file tree
Hide file tree
Showing 13 changed files with 1,327 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The package's installation is done using composer. Simply add these lines to you
```json
{
"require": {
"ProcessOut/ProcessOut-php": "^6.5.0"
"ProcessOut/ProcessOut-php": "^6.6.0"
}
}
```
Expand Down
3 changes: 3 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

include_once(dirname(__FILE__) . "/src/ProcessOut.php");

include_once(dirname(__FILE__) . "/src/Exceptions/ProcessOutExceptionInterface.php");
include_once(dirname(__FILE__) . "/src/Exceptions/AuthenticationException.php");
include_once(dirname(__FILE__) . "/src/Exceptions/GenericException.php");
include_once(dirname(__FILE__) . "/src/Exceptions/InternalException.php");
Expand Down Expand Up @@ -29,6 +30,8 @@
include_once(dirname(__FILE__) . "/src/InvoiceDetail.php");
include_once(dirname(__FILE__) . "/src/CustomerAction.php");
include_once(dirname(__FILE__) . "/src/DunningAction.php");
include_once(dirname(__FILE__) . "/src/Payout.php");
include_once(dirname(__FILE__) . "/src/PayoutItem.php");
include_once(dirname(__FILE__) . "/src/Plan.php");
include_once(dirname(__FILE__) . "/src/Product.php");
include_once(dirname(__FILE__) . "/src/Project.php");
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/AuthenticationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use \Exception;

class AuthenticationException extends Exception
class AuthenticationException extends Exception implements ProcessOutExceptionInterface
{

protected $errorCode;
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/GenericException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use \Exception;

class GenericException extends Exception
class GenericException extends Exception implements ProcessOutExceptionInterface
{

protected $errorCode;
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InternalException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use \Exception;

class InternalException extends Exception
class InternalException extends Exception implements ProcessOutExceptionInterface
{

protected $errorCode;
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use \Exception;

class NotFoundException extends Exception
class NotFoundException extends Exception implements ProcessOutExceptionInterface
{

protected $errorCode;
Expand Down
14 changes: 14 additions & 0 deletions src/Exceptions/ProcessOutExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace ProcessOut\Exceptions;

interface ProcessOutExceptionInterface
{

/**
* Return the error code stored by the ProcessOut exception
* @return string
*/
public function getErrorCode();

}
2 changes: 1 addition & 1 deletion src/Exceptions/ValidationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use \Exception;

class ValidationException extends Exception
class ValidationException extends Exception implements ProcessOutExceptionInterface
{

protected $errorCode;
Expand Down
Loading

0 comments on commit 3556ee1

Please sign in to comment.