From 32d0aa15a6994862d00f70b2148327825b1d73cd Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Mon, 16 Dec 2013 12:38:41 +0100 Subject: [PATCH 1/2] PaymentModuleInterface::pay method force $order parameter --- core/lib/Thelia/Module/PaymentModuleInterface.php | 4 +++- local/modules/Cheque/Cheque.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Module/PaymentModuleInterface.php b/core/lib/Thelia/Module/PaymentModuleInterface.php index 90f8ea0a9..00f3db0dd 100644 --- a/core/lib/Thelia/Module/PaymentModuleInterface.php +++ b/core/lib/Thelia/Module/PaymentModuleInterface.php @@ -23,10 +23,12 @@ namespace Thelia\Module; +use Thelia\Model\Order; + interface PaymentModuleInterface extends BaseModuleInterface { /** * @return mixed */ - public function pay(); + public function pay(Order $order); } diff --git a/local/modules/Cheque/Cheque.php b/local/modules/Cheque/Cheque.php index cebaff146..b7a22a8ef 100755 --- a/local/modules/Cheque/Cheque.php +++ b/local/modules/Cheque/Cheque.php @@ -27,6 +27,7 @@ use Propel\Runtime\Connection\ConnectionInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; use Thelia\Model\ModuleImageQuery; +use Thelia\Model\Order; use Thelia\Module\BaseModule; use Thelia\Module\PaymentModuleInterface; @@ -55,7 +56,7 @@ class Cheque extends BaseModule implements PaymentModuleInterface return $this->dispatcher; } - public function pay() + public function pay(Order $order) { // no special process, waiting for the cheque. } From 315ed1fb09de4ac93228328dbda0bd5d9d2f0923 Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Mon, 16 Dec 2013 14:31:51 +0100 Subject: [PATCH 2/2] fix #144 --- .../Exception/{RessourceException.php => ResourceException.php} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename core/lib/Thelia/Core/Security/Exception/{RessourceException.php => ResourceException.php} (97%) diff --git a/core/lib/Thelia/Core/Security/Exception/RessourceException.php b/core/lib/Thelia/Core/Security/Exception/ResourceException.php similarity index 97% rename from core/lib/Thelia/Core/Security/Exception/RessourceException.php rename to core/lib/Thelia/Core/Security/Exception/ResourceException.php index c19bcf451..27343bd16 100644 --- a/core/lib/Thelia/Core/Security/Exception/RessourceException.php +++ b/core/lib/Thelia/Core/Security/Exception/ResourceException.php @@ -23,7 +23,7 @@ namespace Thelia\Core\Security\Exception; -class RessourceException extends \RuntimeException +class ResourceException extends \RuntimeException { const UNKNOWN_EXCEPTION = 0;