Closed Quetzacoalt91 closed 10 years ago
It's better, but not perfect.
Your functions parent::install()
, registerHook(...)
etc. also return a boolean which allow you to know if each of them succeed. Use them to return the value from install().
ex.:
public function install()
{
return parent::install() && $this->registerHook('payment') && $this->registerHook('paymentReturn');
}
In unionpay.php, neither install() nor uninstall() return a value when they are executed. They MUST return a boolean, or PrestaShop won't be able to know if everything went as expected. In my case, when I click on the install button, I can try to install it a second time because the function didn't return true (same thing for uninstall).
Please add a return value for these function. false if there is a problem, true if everything went good.