本文整理汇总了PHP中PaymentModule::install方法的典型用法代码示例。如果您正苦于以下问题:PHP PaymentModule::install方法的具体用法?PHP PaymentModule::install怎么用?PHP PaymentModule::install使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PaymentModule
的用法示例。
在下文中一共展示了PaymentModule::install方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install
/**
* @return boolean
*/
public function install()
{
if (Shop::isFeatureActive()) {
Shop::setContext(Shop::CONTEXT_ALL);
}
// Install invisible tab
$tab = new Tab();
$tab->name[$this->context->language->id] = $this->l('SecurionPay');
$tab->class_name = 'AdminSecurionPay';
$tab->id_parent = -1;
// No parent tab
$tab->module = $this->name;
$tab->add();
//Init
Configuration::updateValue('SECURIONPAY_CONF', '');
if (!parent::install()) {
return false;
}
if (!Configuration::updateValue(self::MODE, self::MODE_TEST)) {
return false;
}
if (!$this->registerHook('payment') || !$this->registerHook('displayAdminOrder')) {
return false;
}
return true;
}
示例2: install
public function install()
{
if (!parent::install() || !Configuration::updateValue('ALLIEDWALLET_MERCHANT_ID', '') || !Configuration::updateValue('ALLIEDWALLET_SITE_ID', '') || !Configuration::updateValue('ALLIEDWALLET_CONFIRM_PAGE', 'http://' . Tools::safeOutput($_SERVER['HTTP_HOST']) . __PS_BASE_URI__ . 'modules/alliedwallet/validation.php') || !Configuration::updateValue('ALLIEDWALLET_RETURN_PAGE', 'http://' . Tools::safeOutput($_SERVER['HTTP_HOST']) . __PS_BASE_URI__ . 'history.php') || !$this->registerHook('payment')) {
return false;
}
return true;
}
示例3: install
public function install()
{
if (!parent::install() or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) {
return false;
}
return true;
}
示例4: install
public function install()
{
Configuration::updateValue('HIPAY_SALT', uniqid());
if (!Configuration::get('HIPAY_UNIQID')) {
Configuration::updateValue('HIPAY_UNIQID', uniqid());
}
if (!Configuration::get('HIPAY_RATING')) {
Configuration::updateValue('HIPAY_RATING', 'ALL');
}
if (!(parent::install() && $this->registerHook('payment') && $this->registerHook('displayPaymentEU') && $this->registerHook('paymentReturn') && $this->_createAuthorizationOrderState())) {
return false;
}
if (_PS_VERSION_ >= '1.5' && !$this->registerHook('displayBackOfficeHeader')) {
return false;
}
$result = Db::getInstance()->ExecuteS('
SELECT `id_zone`, `name`
FROM `' . _DB_PREFIX_ . 'zone`
WHERE `active` = 1
');
foreach ($result as $rowNumber => $rowValues) {
Configuration::deleteByName('HIPAY_AZ_' . $rowValues['id_zone']);
Configuration::deleteByName('HIPAY_AZ_ALL_' . $rowValues['id_zone']);
}
Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'module_country` WHERE `id_module` = ' . (int) $this->id);
return true;
}
示例5: install
public function install()
{
Configuration::updateValue('HIPAY_SALT', uniqid());
// Force using Prod mod
Configuration::updateValue('HIPAY_PROD', 1);
if (!Configuration::get('HIPAY_UNIQID')) {
Configuration::updateValue('HIPAY_UNIQID', uniqid());
}
if (!Configuration::get('HIPAY_RATING')) {
Configuration::updateValue('HIPAY_RATING', 'ALL');
}
if (!(parent::install() and $this->registerHook('payment'))) {
return false;
}
$result = Db::getInstance()->ExecuteS('
SELECT `id_zone`, `name`
FROM `' . _DB_PREFIX_ . 'zone`
WHERE `active` = 1
');
foreach ($result as $rowNumber => $rowValues) {
Configuration::deleteByName('HIPAY_AZ_' . $rowValues['id_zone']);
Configuration::deleteByName('HIPAY_AZ_ALL_' . $rowValues['id_zone']);
}
Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'module_country` WHERE `id_module` = ' . (int) $this->id);
return true;
}
示例6: install
public function install()
{
if (!parent::install() || !$this->registerHook('displayPayment') || !$this->registerHook('paymentReturn') || !$this->registerHook('displayFooter') || !$this->registerHook('displayHeader') || !$this->registerHook('ModuleRoutes') || !$this->registerHook('displayOrderConfirmation') || !$this->registerHook('displayAdminOrder') || !$this->registerHook('actionOrderStatusUpdate')) {
return false;
}
$status = array('DELIVERY' => array('name' => 'YA Ждёт отправки', 'color' => '#8A2BE2', 'id' => 900, 'paid' => true, 'shipped' => false, 'logable' => true, 'delivery' => true), 'CANCELLED' => array('name' => 'YA Отменен', 'color' => '#b70038', 'id' => 901, 'paid' => false, 'shipped' => false, 'logable' => true, 'delivery' => false), 'PICKUP' => array('name' => 'YA В пункте самовывоза', 'color' => '#cd98ff', 'id' => 902, 'paid' => true, 'shipped' => true, 'logable' => true, 'delivery' => true), 'PROCESSING' => array('name' => 'YA В процессе подготовки', 'color' => '#FF8C00', 'id' => 903, 'paid' => true, 'shipped' => false, 'logable' => false, 'delivery' => true), 'DELIVERED' => array('name' => 'YA Доставлен', 'color' => '#108510', 'id' => 904, 'paid' => true, 'shipped' => true, 'logable' => true, 'delivery' => true), 'UNPAID' => array('name' => 'YA Не оплачен', 'color' => '#ff1c30', 'id' => 905, 'paid' => false, 'shipped' => false, 'logable' => false, 'delivery' => false), 'RESERVATION_EXPIRED' => array('name' => 'YA Резерв отменён', 'color' => '#ff2110', 'id' => 906, 'paid' => false, 'shipped' => false, 'logable' => false, 'delivery' => false), 'RESERVATION' => array('name' => 'YA Резерв', 'color' => '#0f00d3', 'id' => 907, 'paid' => false, 'shipped' => false, 'logable' => false, 'delivery' => false));
foreach ($status as $s) {
$os = new OrderState((int) $s['id']);
$os->id = $s['id'];
$os->force_id = true;
$os->name = $this->multiLangField($s['name']);
$os->color = $s['color'];
$os->module_name = $this->name;
$os->paid = $s['paid'];
$os->logable = $s['logable'];
$os->shipped = $s['shipped'];
$os->delivery = $s['delivery'];
$os->add();
}
$sql = array();
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'pokupki_orders`
(
`id_order` int(10) NOT NULL,
`id_market_order` varchar(100) NOT NULL,
`currency` varchar(100) NOT NULL,
`ptype` varchar(100) NOT NULL,
`home` varchar(100) NOT NULL,
`pmethod` varchar(100) NOT NULL,
`outlet` varchar(100) NOT NULL,
PRIMARY KEY (`id_order`,`id_market_order`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci';
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'mws_return`
(
`id_return` int(10) NOT NULL AUTO_INCREMENT,
`invoice_id` varchar(128) NOT NULL,
`cause` varchar(256) NOT NULL,
`amount` DECIMAL(10,2) NOT NULL,
`request` varchar(1024) NOT NULL,
`response` varchar(1024) NOT NULL,
`status` varchar(1024) NOT NULL,
`error` varchar(1024) NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id_return`,`invoice_id`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci';
foreach ($sql as $qr) {
Db::getInstance()->execute($qr);
}
$customer = new Customer();
$customer->firstname = 'YA POKUPKI Not Delete';
$customer->lastname = 'YA POKUPKI Not Delete';
$customer->email = 'support@supp.com';
$customer->passwd = Tools::encrypt('OPC123456dmo');
$customer->newsletter = 1;
$customer->optin = 1;
$customer->active = 0;
$customer->add();
Configuration::updateValue('YA_POKUPKI_CUSTOMER', $customer->id);
Configuration::updateValue('YA_ORG_INSIDE', 1);
return true;
}
示例7: install
public function install()
{
require_once dirname(__FILE__) . '/swish_install.php';
$swish_install = new SwishInstall();
$swish_install->createTable();
return parent::install() && $this->registerHook('payment') && $this->registerHook('displayLeftColumn') && $this->registerHook('paymentReturn') && $this->registerHook('header');
}
示例8: install
public function install()
{
if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn') || !$this->registerHook('leftColumn') || !$this->registerHook('header') || !Configuration::updateValue('INSTAMOJO', 'instant payments')) {
return false;
}
return true;
}
示例9: install
public function install()
{
if (parent::install()) {
Configuration::updateValue('PayTM_MERCHANT_ID', '');
Configuration::updateValue('PayTM_SECRET_KEY', '');
Configuration::updateValue('PayTM_MODE', '');
Configuration::updateValue('PayTM_GATEWAY_URL', '');
Configuration::updateValue('PayTM_MERCHANT_INDUSTRY_TYPE', '');
Configuration::updateValue('PayTM_MERCHANT_CHANNEL_ID', '');
Configuration::updateValue('PayTM_MERCHANT_WEBSITE', '');
Configuration::updateValue('PayTM_ENABLE_CALLBACK', '');
$this->registerHook('payment');
$this->registerHook('PaymentReturn');
$this->registerHook('ShoppingCartExtra');
if (!Configuration::get('Paytm_ORDER_STATE')) {
$this->setPaytmOrderState('Paytm_ID_ORDER_SUCCESS', 'Payment Received', '#b5eaaa');
$this->setPaytmOrderState('Paytm_ID_ORDER_FAILED', 'Payment Failed', '#E77471');
$this->setPaytmOrderState('Paytm_ID_ORDER_PENDING', 'Payment Pending', '#F4E6C9');
Configuration::updateValue('Paytm_ORDER_STATE', '1');
}
return true;
} else {
return false;
}
}
示例10: install
public function install()
{
if (!parent::install() || !$this->createTransactionTable() || !Configuration::updateValue('PAYNL_TOKEN', '') || !Configuration::updateValue('PAYNL_SERVICE_ID', '') || !Configuration::updateValue('PAYNL_ORDER_DESC', '') || !Configuration::updateValue('PAYNL_WAIT', '10') || !Configuration::updateValue('PAYNL_SUCCESS', '2') || !Configuration::updateValue('PAYNL_AMOUNTNOTVALID', '0') || !Configuration::updateValue('PAYNL_CANCEL', '6') || !Configuration::updateValue('PAYNL_COUNTRY_EXCEPTIONS', '') || !Configuration::updateValue('PAYNL_PAYMENT_METHOD_ORDER', '') || !$this->registerHook('paymentReturn') || !$this->registerHook('payment')) {
return false;
}
return true;
}
示例11: install
public function install()
{
if (!parent::install() or !Configuration::updateValue('ipay88_merchantCode', '') or !Configuration::updateValue('ipay88_merchantKey', '') or !Configuration::updateValue('IPAY88_URL', 1) or !$this->registerHook('payment')) {
return false;
}
return true;
}
示例12: install
public function install()
{
if (!parent::install() or !Configuration::updateValue('ECARD_MERCHANTID', '2729393') or !Configuration::updateValue('ECARD_PASS', 'e1c2a3') or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) {
return false;
}
return true;
}
示例13: install
public function install()
{
return parent::install() && Configuration::updateValue('PAYMENTSENSE_GATEWAYID', '') && Configuration::updateValue('PAYMENTSENSE_GATEWAYPASS', '') && Configuration::updateValue('PAYMENTSENSE_PSK', '') && Configuration::updateValue('PAYMENTSENSE_DEBUG', '') && Configuration::updateValue('PAYMENTSENSE_TRANSACTION_TYPE', '') && $this->registerHook('payment') && $this->registerHook('paymentReturn');
/* Blank line to retain line numbers in changelog*/
/* Blank line to retain line numbers in changelog*/
/* Blank line to retain line numbers in changelog*/
}
示例14: install
/**
* Installing module through the backend
*
* @return bool
*/
function install()
{
// Use parent installing method first
if (parent::install()) {
// Register hooks
$this->registerHook('payment');
$this->registerHook('paymentReturn');
// Get configuration fields
$fields = $this->getConfFields();
// Check if all configuration fields can be updated
// and clear previous values
foreach ($fields as $field) {
$confField = strtoupper($field);
if (!Configuration::updateValue($confField, '')) {
return false;
}
}
// Define order status for successful payment
Configuration::updateValue('_SU_OS_OK_', 2);
// Define order status for errors during the order process
Configuration::updateValue('_SU_OS_ERROR_', 8);
// Installation complete
return true;
}
return false;
}
示例15: install
/**
* Perform instalation of PagSeguro module
*
* @return boolean
*/
public function install()
{
if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn') || !Configuration::updateValue('PAGSEGURO_EMAIL', '') || !Configuration::updateValue('PAGSEGURO_TOKEN', '') || !Configuration::updateValue('PAGSEGURO_URL_REDIRECT', '') || !Configuration::updateValue('PAGSEGURO_NOTIFICATION_URL', '') || !Configuration::updateValue('PAGSEGURO_CHARSET', PagSeguroConfig::getData('application', 'charset')) || !Configuration::updateValue('PAGSEGURO_LOG_ACTIVE', PagSeguroConfig::getData('log', 'active')) || !Configuration::updateValue('PAGSEGURO_LOG_FILELOCATION', PagSeguroConfig::getData('log', 'fileLocation')) || !Configuration::updateValue('PS_OS_PAGSEGURO', 0) || !$this->_generatePagSeguroOrderStatus()) {
return false;
}
return true;
}