Drudge Posted April 17, 2016 Share Posted April 17, 2016 Hello community members, I have been pulling my hair since past 2-3 hours . I am creating a payment module . I have created it and it is installing well and i can configure the module setting. But when i install it i cannot see the payment method in the checkout page. I tried by googling with many keywords but i am not able find the appropriate answer. The module get installed and module can be transplanted in displayment hook but it doesn't show up in the checkout page. Any suggestion are appreciated. P.s. I have checked all the payment restriction and every thing is fine . Thank you Link to comment Share on other sites More sharing options...
Rolige Posted April 17, 2016 Share Posted April 17, 2016 Check in the "Back Office > Modules > Payment modules" if your custom module is allowed in the customer group and currency of your test customer. Link to comment Share on other sites More sharing options...
Drudge Posted April 17, 2016 Author Share Posted April 17, 2016 Thank you for you reply . Yes, i have checked that . Every(currencies,group,country) restriction is checked there . i.e. mine custom module is available for every restriction. Is there any other issue ? Link to comment Share on other sites More sharing options...
Rolige Posted April 17, 2016 Share Posted April 17, 2016 What is the code inside the method hookPayment?, maybe you have a restriction here, or in the __construct method Link to comment Share on other sites More sharing options...
Drudge Posted April 17, 2016 Author Share Posted April 17, 2016 (edited) Here is the __construct method public function __construct(){$this->name = 'mypayment';$this->tab = 'payments_gateways';$this->version = '1.0.0';$this->author = 'DrudgeRajen';$this->need_instance = 0;$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); $this->mypayment_available_currencies = array('USD','AUD','CAD','EUR','GBP','NZD'); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('mypaymentmodule');$this->description = $this->l('mypayment gateway for Nepal..'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); if(!Configuration::get('mypayment'))$this->warning = $this->l('No name provided.'); //Requires includesrequire_once(dirname (__FILE__) . "/includes/tools.php");} And in hookPayment method : public function hookPayment($params) { // echo "tst";exit; if(Configuration::get('mypayment')){ $mypayment = mypayment_tools::getRow(); if($mypayment['test_mode']==0){ $mypayment_action_url = $mypayment['test_url']; } else{ $mypayment_action_url = $mypayment['live_url']; } $this->context->smarty->assign(array( 'mypayment_action_url' => $mypayment_action_url, 'merchant_service_code' => $mypayment['merchant_service_code'] // 'mypayment_success_url' => $this->context->link )); return $this->display(__FILE__, 'standard.tpl'); } when i install the module and transplant the hook, it doesn't echo any thing inside this hookpayment method. Can you please give me any idea for debugging it ?? Edited April 17, 2016 by Drudge (see edit history) Link to comment Share on other sites More sharing options...
Drudge Posted April 17, 2016 Author Share Posted April 17, 2016 I just solve the issue. I just clear the cache from Back>Advance parameters>>Performance. It is working now Hope this will help someone . Link to comment Share on other sites More sharing options...
Rolige Posted April 18, 2016 Share Posted April 18, 2016 Nice, but strange solution Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now