Welcome to the THELIA support and discusssion forum


Hi All,
I'm newbie in Thelia and Symfony(maybe this is the problem), but I have a problem with my payment module after updateing 2.2.2 to 2.3.

In my payment module, I extend AbstractPaymentModule than at one point I have to redirect the customer to Payment providers page(this is a credit card payment).
In the past it worked with(in the Pay() function):
return new RedirectResponse($myURL));

Now I got an error message:
[26-Apr-2016 12:39:59 Europe/Budapest] PHP Catchable fatal error:  Argument 1 passed to Thelia\Core\Event\Order\OrderPaymentEvent::setResponse() must be an instance of Thelia\Core\HttpFoundation\Response, instance of Symfony\Component\HttpFoundation\RedirectResponse given, called in /var/www/mysite/web/core/lib/Thelia/Action/Module.php on line 412 and defined in /var/www/mysite/web/core/lib/Thelia/Core/Event/Order/OrderPaymentEvent.php on line 54


This is a 2.3.0 bug. I've raised an issue about this:

To temporarly solve the problem, remplace in line 16 of core/lib/Thelia/Core/Event/Order/OrderPaymentEvent.php :

use Thelia\Core\HttpFoundation\Response;


use Symfony\Component\HttpFoundation\Response;

CQFDev | Sites, boutiques, modules, développement et intégration pour Thelia 1 et 2


OK, Thank You! I'll try!
Temprorary(also) I found the generateGatewayFormResponse method and modified the order-payment-gateway.html form:
I changed the form method post to get. It is Ok for me because this is the only card payment on my site.
Keep up the good work!

Last edited by akidur (26-04-2016 15:51:27)