예제 #1
0
function upgrade_module_0_9_7($module)
{
    // Add test status && add hook
    Configuration::deleteByName('PAYPLUG_ORDER_STATE_REFUND');
    Payplug::updateConfiguration('PAYPLUG_SANDBOX', '0');
    $install = new InstallPayplug();
    $install->createOrderState();
    $module->registerHook('header');
    $install->installPayplugLock();
    return true;
    // Return true if success.
}
예제 #2
0
 public function install()
 {
     if (version_compare(_PS_VERSION_, '1.4', '<') || !parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn')) {
         return false;
     }
     if (!$this->registerHook('header')) {
         return false;
     }
     $payplug_install = new InstallPayplug();
     $payplug_install->createConfig();
     $payplug_install->createOrderState();
     $payplug_install->installPayplugLock();
     return true;
 }