module - Prestashop displayPaymentReturn hook url -
i new prestashop developer , trying create paymentmodule. have got show payment method can not proceed purchase because not know hot works.
does know should redirect run hooddisplaypaymentreturn method?
i happy if explain me complete navigation map make purchase.
anyway, can find relation between hooks , pages?
when have new module payment rely on simplest provided prestashop: bankwire.
inside can find 3 hooks.
hookpayment:
public function hookpayment($params) { if (!$this->active) return; if (!$this->checkcurrency($params['cart'])) return; $this->smarty->assign(array( 'this_path' => $this->_path, 'this_path_bw' => $this->_path, 'this_path_ssl' => tools::getshopdomainssl(true, true).__ps_base_uri__.'modules/'.$this->name.'/' )); return $this->display(__file__, 'payment.tpl'); }
hookdisplaypaymenteu:
public function hookdisplaypaymenteu($params) { if (!$this->active) return; if (!$this->checkcurrency($params['cart'])) return; $payment_options = array( 'cta_text' => $this->l('pay bank wire'), 'logo' => media::getmediapath(_ps_module_dir_.$this->name.'/bankwire.jpg'), 'action' => $this->context->link->getmodulelink($this->name, 'validation', array(), true) ); return $payment_options; }
hookpaymentreturn:
public function hookpaymentreturn($params) { if (!$this->active) return; $state = $params['objorder']->getcurrentstate(); if (in_array($state, array(configuration::get('ps_os_bankwire'), configuration::get('ps_os_outofstock'), configuration::get('ps_os_outofstock_unpaid')))) { $this->smarty->assign(array( 'total_to_pay' => tools::displayprice($params['total_to_pay'], $params['currencyobj'], false), 'bankwiredetails' => tools::nl2br($this->details), 'bankwireaddress' => tools::nl2br($this->address), 'bankwireowner' => $this->owner, 'status' => 'ok', 'id_order' => $params['objorder']->id )); if (isset($params['objorder']->reference) && !empty($params['objorder']->reference)) $this->smarty->assign('reference', $params['objorder']->reference); } else $this->smarty->assign('status', 'failed'); return $this->display(__file__, 'payment_return.tpl'); }
Module - Prestashop Displaypaymentreturn Hook Url - >>>>> Download Now
ReplyDelete>>>>> Download Full
Module - Prestashop Displaypaymentreturn Hook Url - >>>>> Download LINK
>>>>> Download Now
Module - Prestashop Displaypaymentreturn Hook Url - >>>>> Download Full
>>>>> Download LINK 7G