request = $request; } public function getRequest() { return $this->request; } public function setDispatcher(EventDispatcherInterface $dispatcher) { $this->dispatcher = $dispatcher; } public function getDispatcher() { return $this->dispatcher; } public function pay(Order $order) { // no special process, waiting for the cheque. } /** * * This method is call on Payment loop. * * If you return true, the payment method will de display * If you return false, the payment method will not be display * * @return boolean */ public function isValidPayment() { return true; } public function postActivation(ConnectionInterface $con = null) { /* insert the images from image folder if first module activation */ $module = $this->getModuleModel(); if(ModuleImageQuery::create()->filterByModule($module)->count() == 0) { $this->deployImageFolder($module, sprintf('%s/images', __DIR__), $con); } /* set module title */ $this->setTitle( $module, array( "en_US" => "Cheque", "fr_FR" => "Cheque", ) ); } public function getCode() { return 'Cheque'; } }