@@verze 1 @@sql CREATE TABLE IF NOT EXISTS `mod_eshop_payment_regular`( `id` tinyint(4) NOT NULL AUTO_INCREMENT, `mod_eshop_payment_id` int(11) NOT NULL, `mod_eshop_objednavka_id` int(11) NOT NULL, `authkey` text NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `mod_eshop_payment_id` (`mod_eshop_payment_id`), KEY `mod_eshop_objednavka_id` (`mod_eshop_objednavka_id`), CONSTRAINT `mod_eshop_payment_regular_ibfk_1` FOREIGN KEY (`mod_eshop_payment_id`) REFERENCES `mod_eshop_payment` (`idobjednavka`), CONSTRAINT `mod_eshop_payment_regular_ibfk_2` FOREIGN KEY (`mod_eshop_objednavka_id`) REFERENCES `mod_eshop_objednavka` (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@conf+:eshop_conf.php /* ---- Nastavení ThePay 2.0 ---- */ if (!isset($onlineplatba_system)) $onlineplatba_system = array(); // ThePay 2.0 $onlineplatba_system[] = 'thepay2'; $onlineplatba_konfigurace["thepay2"][1] = [ 'merchantId' => '', 'projectId' => '', 'apiPassword' => '', 'test' => 1, 'regularPaymentInterval' => 3600 // In seconds ]; @@init ThePay2\ThePay2::integrate(); ThePay2\ThePay2::make()->setRegularPaymentCallback(function (EshopObjednavka $o) { // TODO Implement a function to determine which payment shoul be regular, delete if no regular payment is needed // TODO Should return RegularPayment object or false return false; }); @@reflection if (!isset($moduly["eshop"])) return "nelze"; eval(nactinastavenimodulu("eshop")); if (!isset($enhanced_online_payments) or !$enhanced_online_payments) return "nelze"; if (GenericPaymentSystem::isSystemRegistered("thepay2")) return "ano"; return "ne";