I created payment module for Prestashop 1.6.1.1.
The problem is with updating order state after customer returns from banks website. I can not get cart from context as shown on examples.
For example, this is controller, which is executed, when customer presses cancel button on bank:
class MyModulePaymentCancelModuleFrontController extends ModuleFrontController{
public function initContent(){
$cart = $this->context->cart;
}
}
The cart value is null. It seems like the cart has been deleted / discarded prior to the controller.
In the contrary, I get proper cart from context in MyModulePaymentModuleFrontController (creating order) and MyModulePaymentReturnModuleFrontController (payment completed successfully).
Could anyone please point me in the right direction.