示例#1
0
 public function __construct()
 {
     $this->name = 'bankwire';
     $this->tab = 'payments_gateways';
     $this->version = '1.0.8';
     $this->author = 'PrestaShop';
     $this->controllers = array('payment', 'validation');
     $this->is_eu_compatible = 1;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('BANK_WIRE_DETAILS', 'BANK_WIRE_OWNER', 'BANK_WIRE_ADDRESS'));
     if (!empty($config['BANK_WIRE_OWNER'])) {
         $this->owner = $config['BANK_WIRE_OWNER'];
     }
     if (!empty($config['BANK_WIRE_DETAILS'])) {
         $this->details = $config['BANK_WIRE_DETAILS'];
     }
     if (!empty($config['BANK_WIRE_ADDRESS'])) {
         $this->address = $config['BANK_WIRE_ADDRESS'];
     }
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('Bank wire');
     $this->description = $this->l('Accept payments for your products via bank wire transfer.');
     $this->confirmUninstall = $this->l('Are you sure about removing these details?');
     if (!isset($this->owner) || !isset($this->details) || !isset($this->address)) {
         $this->warning = $this->l('Account owner and account details must be configured before using this module.');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     $this->extra_mail_vars = array('{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'), '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')), '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS')));
 }
示例#2
0
 public function __construct()
 {
     $this->name = 'payu';
     $this->tab = 'payments_gateways';
     $this->version = '1.2';
     $this->author = 'PrestaShop';
     $this->currencies = true;
     $this->currencies_mode = 'radio';
     parent::__construct();
     $this->_errors = array();
     $this->page = basename(__FILE__, '.php');
     $this->displayName = $this->l('PayUMoney Checkout');
     $this->description = $this->l('PayUMoney Checkout API implementation');
     if (!sizeof(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency set for this module');
     }
     /* For 1.4.3 and less compatibility */
     $updateConfig = array('PS_OS_CHEQUE' => 1, 'PS_OS_PAYMENT' => 2, 'PS_OS_PREPARATION' => 3, 'PS_OS_SHIPPING' => 4, 'PS_OS_DELIVERED' => 5, 'PS_OS_CANCELED' => 6, 'PS_OS_REFUND' => 7, 'PS_OS_ERROR' => 8, 'PS_OS_OUTOFSTOCK' => 9, 'PS_OS_BANKWIRE' => 10, 'PS_OS_PAYPAL' => 11, 'PS_OS_WS_PAYMENT' => 12);
     foreach ($updateConfig as $u => $v) {
         if (!Configuration::get($u) || (int) Configuration::get($u) < 1) {
             if (defined('_' . $u . '_') && (int) constant('_' . $u . '_') > 0) {
                 Configuration::updateValue($u, constant('_' . $u . '_'));
             } else {
                 Configuration::updateValue($u, $v);
             }
         }
     }
 }
示例#3
0
 public function __construct()
 {
     $this->name = 'cheque';
     $this->tab = 'payments_gateways';
     $this->version = '2.3';
     $this->author = 'PrestaShop';
     $this->controllers = array('payment', 'validation');
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('CHEQUE_NAME', 'CHEQUE_ADDRESS'));
     if (isset($config['CHEQUE_NAME'])) {
         $this->chequeName = $config['CHEQUE_NAME'];
     }
     if (isset($config['CHEQUE_ADDRESS'])) {
         $this->address = $config['CHEQUE_ADDRESS'];
     }
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('Payments by check');
     $this->description = $this->l('This module allows you to accept payments by check.');
     $this->confirmUninstall = $this->l('Are you sure you want to delete these details?');
     if (!isset($this->chequeName) || !isset($this->address) || empty($this->chequeName) || empty($this->address)) {
         $this->warning = $this->l('The "Pay to the order of" and "Address" fields must be configured before using this module.');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     $this->extra_mail_vars = array('{cheque_name}' => Configuration::get('CHEQUE_NAME'), '{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'), '{cheque_address_html}' => str_replace("\n", '<br />', Configuration::get('CHEQUE_ADDRESS')));
 }
 public function __construct()
 {
     $this->name = 'ps_checkpayment';
     $this->tab = 'payments_gateways';
     $this->version = '1.0.8';
     $this->author = 'PrestaShop';
     $this->controllers = array('payment', 'validation');
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('CHEQUE_NAME', 'CHEQUE_ADDRESS'));
     if (isset($config['CHEQUE_NAME'])) {
         $this->checkName = $config['CHEQUE_NAME'];
     }
     if (isset($config['CHEQUE_ADDRESS'])) {
         $this->address = $config['CHEQUE_ADDRESS'];
     }
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->trans('Payments by check', array(), 'Modules.CheckPayment.Admin');
     $this->description = $this->trans('This module allows you to accept payments by check.', array(), 'Modules.CheckPayment.Admin');
     $this->confirmUninstall = $this->trans('Are you sure you want to delete these details?', array(), 'Modules.CheckPayment.Admin');
     $this->ps_versions_compliancy = array('min' => '1.7.0.0', 'max' => _PS_VERSION_);
     if (!isset($this->checkName) || !isset($this->address) || empty($this->checkName) || empty($this->address)) {
         $this->warning = $this->trans('The "Payee" and "Address" fields must be configured before using this module.', array(), 'Modules.CheckPayment.Admin');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->trans('No currency has been set for this module.', array(), 'Modules.CheckPayment.Admin');
     }
     $this->extra_mail_vars = array('{check_name}' => Configuration::get('CHEQUE_NAME'), '{check_address}' => Configuration::get('CHEQUE_ADDRESS'), '{check_address_html}' => Tools::nl2br(Configuration::get('CHEQUE_ADDRESS')));
 }
示例#5
0
 public function __construct()
 {
     $this->name = 'bankwire';
     $this->tab = 'Payment';
     $this->version = '0.5';
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('BANK_WIRE_DETAILS', 'BANK_WIRE_OWNER', 'BANK_WIRE_ADDRESS'));
     if (isset($config['BANK_WIRE_OWNER'])) {
         $this->owner = $config['BANK_WIRE_OWNER'];
     }
     if (isset($config['BANK_WIRE_DETAILS'])) {
         $this->details = $config['BANK_WIRE_DETAILS'];
     }
     if (isset($config['BANK_WIRE_ADDRESS'])) {
         $this->address = $config['BANK_WIRE_ADDRESS'];
     }
     parent::__construct();
     $this->displayName = $this->l('Bank Wire');
     $this->description = $this->l('Accept payments by bank wire');
     $this->confirmUninstall = $this->l('Are you sure you want to delete your details?');
     if (!isset($this->owner) or !isset($this->details) or !isset($this->address)) {
         $this->warning = $this->l('Account owner and details must be configured in order to use this module correctly');
     }
     if (!sizeof(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency set for this module');
     }
 }
示例#6
0
文件: cheque.php 项目: sealence/local
 function __construct()
 {
     $this->name = 'cheque';
     $this->tab = 'Payment';
     $this->version = 2.2;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('CHEQUE_NAME', 'CHEQUE_ADDRESS'));
     if (isset($config['CHEQUE_NAME'])) {
         $this->chequeName = $config['CHEQUE_NAME'];
     }
     if (isset($config['CHEQUE_ADDRESS'])) {
         $this->address = $config['CHEQUE_ADDRESS'];
     }
     parent::__construct();
     $this->displayName = $this->l('Cheque');
     $this->description = $this->l('Module for accepting payments by cheque');
     $this->confirmUninstall = $this->l('Are you sure you want to delete your details ?');
     if (!isset($this->chequeName) or !isset($this->address)) {
         $this->warning = $this->l('\'To the order of\' and address must be configured in order to use this module correctly');
     }
     if (!sizeof(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency set for this module');
     }
 }
 public function __construct()
 {
     $this->name = 'sign2pay';
     $this->tab = 'payments_gateways';
     $this->version = '0.1.0';
     $this->author = 'Berkan Düzgün';
     $this->controllers = array('payment', 'validation');
     $this->availableCurrencies = array('EUR');
     $config = Configuration::getMultiple(array('SIGN2PAY_APPLICATION_TOKEN', 'SIGN2PAY_MERCHANT_ID', 'SIGN2PAY_API_TOKEN'));
     if (!empty($config['SIGN2PAY_MERCHANT_ID'])) {
         $this->merchandId = $config['SIGN2PAY_MERCHANT_ID'];
     }
     if (!empty($config['SIGN2PAY_APPLICATION_TOKEN'])) {
         $this->applicationToken = $config['SIGN2PAY_APPLICATION_TOKEN'];
     }
     if (!empty($config['SIGN2PAY_API_TOKEN'])) {
         $this->apiToken = $config['SIGN2PAY_API_TOKEN'];
     }
     parent::__construct();
     $this->displayName = $this->l('Sign2Pay');
     $this->description = $this->l('Sign2Pay payment method.');
     $this->confirmUninstall = $this->l('Are you sure about removing these details?');
     if (!isset($this->merchandId) || !isset($this->applicationToken) || !isset($this->apiToken)) {
         $this->warning = $this->l('API credentials must be configured before using this module.');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     $this->extra_mail_vars = array('{sign2pay_merchant_id}' => Configuration::get('SIGN2PAY_MERCHANT_ID'), '{sign2pay_application_token}' => nl2br(Configuration::get('SIGN2PAY_APPLICATION_TOKEN')), '{sign2pay_api_token}' => nl2br(Configuration::get('SIGN2PAY_API_TOKEN')));
 }
 public function __construct()
 {
     if (!defined('_PS_VERSION_')) {
         exit;
     }
     include_once dirname(__FILE__) . '/classes/mws.php';
     include_once dirname(__FILE__) . '/classes/oc.php';
     include_once dirname(__FILE__) . '/classes/partner.php';
     include_once dirname(__FILE__) . '/classes/ymlclass.php';
     include_once dirname(__FILE__) . '/classes/hforms.php';
     include_once dirname(__FILE__) . '/classes/callback.php';
     include_once dirname(__FILE__) . '/lib/api.php';
     include_once dirname(__FILE__) . '/lib/external_payment.php';
     $this->name = 'yamodule';
     $this->tab = 'payments_gateways';
     $this->version = '1.3.1';
     $this->author = 'Яндекс.Деньги';
     $this->need_instance = 1;
     $this->bootstrap = 1;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     parent::__construct();
     $this->cryptor = $this->getCryptor();
     $this->displayName = $this->l('Y.CMS Prestashop');
     $this->description = $this->l('Yandex.Money, Yandex.Service, Yandex.Metrika, Yandex.Market Orders in the Market');
     $this->confirmUninstall = $this->l('Really uninstall the module?');
     if (!sizeof(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('There is no set currency for your module!');
     }
 }
 public function __construct()
 {
     $this->name = 'gcheckout';
     $this->tab = 'payments_gateways';
     $this->version = '1.2';
     $this->author = 'PrestaShop';
     $this->currencies = true;
     $this->currencies_mode = 'radio';
     parent::__construct();
     $this->displayName = $this->l('Google Checkout');
     $this->description = $this->l('Google Checkout API implementation');
     if (!sizeof(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency set for this module');
     }
     /* For 1.4.3 and less compatibility */
     $updateConfig = array('PS_OS_CHEQUE', 'PS_OS_PAYMENT', 'PS_OS_PREPARATION', 'PS_OS_SHIPPING', 'PS_OS_CANCELED', 'PS_OS_REFUND', 'PS_OS_ERROR', 'PS_OS_OUTOFSTOCK', 'PS_OS_BANKWIRE', 'PS_OS_PAYPAL', 'PS_OS_WS_PAYMENT');
     if (!Configuration::get('PS_OS_PAYMENT')) {
         foreach ($updateConfig as $u) {
             if (!Configuration::get($u) && defined('_' . $u . '_')) {
                 Configuration::updateValue($u, constant('_' . $u . '_'));
             }
         }
     }
     /** Backward compatibility */
     require _PS_MODULE_DIR_ . $this->name . '/backward_compatibility/backward.php';
 }
 public function __construct()
 {
     $this->name = 'hipay_tpp';
     $this->tab = 'payments_gateways';
     $this->version = '1.3.0';
     $this->module_key = 'e25bc8f4f9296ef084abf448bca4808a';
     $this->author = 'HiPay';
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('HIPAY_API_USERNAME', 'HIPAY_API_PASSWORD', 'HIPAY_TEST_API_USERNAME', 'HIPAY_TEST_API_PASSWORD', 'HIPAY_TEST_MODE', 'HIPAY_PAYMENT_MODE', 'HIPAY_CHALLENGE_URL', 'HIPAY_CSS_URL', 'HIPAY_ALLOWED_CARDS', 'HIPAY_ALLOWED_LOCAL_CARDS', 'HIPAY_THREEDSECURE', 'HIPAY_THREEDSECURE_AMOUNT', 'HIPAY_MANUALCAPTURE', 'HIPAY_MEMORIZE', 'HIPAY_TEMPLATE_MODE', 'HIPAY_SELECTOR_MODE', 'HIPAY_IFRAME_WIDTH', 'HIPAY_IFRAME_HEIGHT'));
     // For callbacks
     $config = Configuration::getMultiple(array('HIPAY_PROCESSING_QUEUE', 'HIPAY_LAST_PROCESS'));
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('HiPay Fullservice');
     $this->description = $this->l('Accept transactions worldwide on any device with local & international payment methods. Benefit from a next-gen fraud protection tool.');
     $this->confirmUninstall = $this->l('Are you sure you wish to uninstall HiPay Fullservice?');
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     /** Backward compatibility */
     if (_PS_VERSION_ < '1.5') {
         require _PS_MODULE_DIR_ . $this->name . '/backward_compatibility/backward.php';
     }
     global $smarty;
     $smarty->assign(array('hipay_version' => $this->version));
 }
示例#11
0
 public function __construct()
 {
     $this->name = 'bankwire';
     $this->tab = 'payments_gateways';
     $this->version = '0.5';
     $this->author = 'PrestaShop';
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('BANK_WIRE_DETAILS', 'BANK_WIRE_OWNER', 'BANK_WIRE_ADDRESS'));
     if (isset($config['BANK_WIRE_OWNER'])) {
         $this->owner = $config['BANK_WIRE_OWNER'];
     }
     if (isset($config['BANK_WIRE_DETAILS'])) {
         $this->details = $config['BANK_WIRE_DETAILS'];
     }
     if (isset($config['BANK_WIRE_ADDRESS'])) {
         $this->address = $config['BANK_WIRE_ADDRESS'];
     }
     parent::__construct();
     $this->displayName = $this->l('Bank Wire');
     $this->description = $this->l('Accept payments by bank wire.');
     $this->confirmUninstall = $this->l('Are you sure you want to delete your details?');
     if (!isset($this->owner) || !isset($this->details) || !isset($this->address)) {
         $this->warning = $this->l('Account owner and details must be configured in order to use this module correctly.');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency set for this module');
     }
     $this->extra_mail_vars = array('{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'), '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')), '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS')));
 }
示例#12
0
 public function __construct()
 {
     $this->name = 'cheque';
     $this->tab = 'payments_gateways';
     $this->version = '2.3';
     $this->author = 'PrestaShop';
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('CHEQUE_NAME', 'CHEQUE_ADDRESS'));
     if (isset($config['CHEQUE_NAME'])) {
         $this->chequeName = $config['CHEQUE_NAME'];
     }
     if (isset($config['CHEQUE_ADDRESS'])) {
         $this->address = $config['CHEQUE_ADDRESS'];
     }
     parent::__construct();
     $this->displayName = $this->l('Check');
     $this->description = $this->l('Module for accepting payments by check.');
     $this->confirmUninstall = $this->l('Are you sure you want to delete your details ?');
     if ($this->active && (!isset($this->chequeName) || !isset($this->address) || empty($this->chequeName) || empty($this->address))) {
         $this->warning = $this->l('\'To the order of\' and address must be configured in order to use this module correctly.');
     }
     if ($this->active && !count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency set for this module');
     }
     $this->extra_mail_vars = array('{cheque_name}' => Configuration::get('CHEQUE_NAME'), '{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'), '{cheque_address_html}' => str_replace("\n", '<br />', Configuration::get('CHEQUE_ADDRESS')));
 }
示例#13
0
 /**
  * Construct
  */
 public function __construct()
 {
     $this->name = 'realexredirect';
     $this->tab = 'payments_gateways';
     $this->version = '1.4';
     $this->author = 'Coccinet';
     $this->bout_valide = $this->l('Validate');
     $this->bout_suppr = $this->l('Do you want to delete your stored card ?');
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('REALEX_REDIRECT_MERCHANT_ID', 'REALEX_REDIRECT_SHARED_SECRET', 'REALEX_REDIRECT_SETTLEMENT', 'REALEX_REDIRECT_SUBACCOUNT', 'REALEX_REDIRECT_REALVAULT', 'REALEX_REDIRECT_CVN', 'REALEX_REDIRECT_LIABILITY'));
     if (isset($config['REALEX_REDIRECT_MERCHANT_ID'])) {
         $this->merchant_id = $config['REALEX_REDIRECT_MERCHANT_ID'];
     }
     if (isset($config['REALEX_REDIRECT_SHARED_SECRET'])) {
         $this->shared_secret = $config['REALEX_REDIRECT_SHARED_SECRET'];
     }
     if (isset($config['REALEX_REDIRECT_SETTLEMENT'])) {
         $this->settlement = $config['REALEX_REDIRECT_SETTLEMENT'];
     }
     if (isset($config['REALEX_REDIRECT_REALVAULT'])) {
         $this->realvault = $config['REALEX_REDIRECT_REALVAULT'];
     }
     if (isset($config['REALEX_REDIRECT_CVN'])) {
         $this->cvn = $config['REALEX_REDIRECT_CVN'];
     }
     if (isset($config['REALEX_REDIRECT_LIABILITY'])) {
         $this->liability = $config['REALEX_REDIRECT_LIABILITY'];
     }
     parent::__construct();
     if (Configuration::get('PS_SSL_ENABLED')) {
         $this->url_validation = Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'module/' . $this->name . '/validation';
     } else {
         $this->url_validation = Tools::getShopDomain(true, true) . __PS_BASE_URI__ . 'module/' . $this->name . '/validation';
     }
     $this->displayName = $this->l('Realex Payments');
     $this->description = $this->l('Use Realex Payments as your payments service provider.');
     $this->confirmUninstall = $this->l('Are you sure you want to delete this information?');
     $this->ps_versions_compliancy = array('min' => '1.5', 'max' => _PS_VERSION_);
     if (!function_exists('curl_version')) {
         $this->warning = $this->l('cURL librairy is not available.');
     } elseif (!Configuration::get('PS_REWRITING_SETTINGS')) {
         $this->warning = $this->l('URL Rewriting must be enabled before using this module.');
     } elseif (!isset($this->merchant_id) || empty($this->shared_secret) || !isset($this->settlement) || !isset($this->realvault) || !isset($this->cvn) || !isset($this->liability)) {
         $this->warning = $this->l('Realex Payment details must be configured before using this module.');
     } elseif (!$this->getTableAccount()) {
         $this->warning = $this->l('You have to configure at least one subaccount');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     /** Backward compatibility */
     if (version_compare(_PS_VERSION_, '1.5', '<')) {
         require _PS_MODULE_DIR_ . $this->name . '/backward_compatibility/backward.php';
     }
 }
示例#14
0
 function __construct()
 {
     $this->name = 'gcheckout';
     $this->tab = 'Payment';
     $this->version = 1.0;
     $this->currencies = true;
     $this->currencies_mode = 'radio';
     parent::__construct();
     $this->displayName = $this->l('Google Checkout');
     $this->description = $this->l('Google Checkout API implementation');
     if (!sizeof(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency set for this module');
     }
 }
 public function __construct()
 {
     $this->name = 'veritransinstallment';
     $this->tab = 'payments_gateways';
     $this->version = '1.0';
     $this->author = 'Veritrans';
     $this->bootstrap = true;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $this->veritrans_convenience_fee = 0;
     // key length must be between 0-32 chars to maintain compatibility with <= 1.5
     $this->config_keys = array('VI_CLIENT_KEY', 'VI_SERVER_KEY', 'VI_API_VERSION', 'VI_PAYMENT_TYPE', 'VI_3D_SECURE', 'VI_KURS', 'VI_CONVENIENCE_FEE', 'VI_PAYMENT_SUCCESS_STATUS_MAP', 'VI_PAYMENT_FAILURE_STATUS_MAP', 'VI_PAYMENT_CHALLENGE_STATUS_MAP', 'VI_ENVIRONMENT', 'VI_SANITIZED', 'VI_ENABLE_INSTALLMENT', 'VI_INSTALLMENTS_BNI', 'VI_INSTALLMENTS_TERM', 'VI_BIN_FILTER', 'VI_DISPLAY_NAME', 'VI_AMOUNT_THRESHOLD');
     foreach (array('BNI', 'MANDIRI') as $bank) {
         foreach (array(3, 6, 12) as $months) {
             array_push($this->config_keys, 'VI_INSTALLMENTS_' . $bank . '_' . $months);
         }
     }
     $config = Configuration::getMultiple($this->config_keys);
     foreach ($this->config_keys as $key) {
         if (isset($config[$key])) {
             $this->{strtolower($key)} = $config[$key];
         }
     }
     if (isset($config['VI_KURS'])) {
         $this->veritrans_kurs = $config['VI_KURS'];
     } else {
         Configuration::set('VI_KURS', 10000);
     }
     if (!isset($config['VI_DISPLAY_NAME'])) {
         Configuration::set('VI_DISPLAY_NAME', "Credit Card Installment");
     }
     if (!isset($config['VI_AMOUNT_THRESHOLD']) || strlen($config['VI_AMOUNT_THRESHOLD']) < 1) {
         Configuration::set('VI_AMOUNT_THRESHOLD', "500000");
     }
     Configuration::set('VI_API_VERSION', 2);
     Configuration::set('VI_PAYMENT_TYPE', 'vtweb');
     if (!isset($config['VI_SANITIZED'])) {
         Configuration::set('VI_SANITIZED', 0);
     }
     parent::__construct();
     $this->displayName = $this->l('Veritrans Offline Installment');
     $this->description = $this->l('Accept offline installment payments for your products via Veritrans.');
     $this->confirmUninstall = $this->l('Are you sure about uninstalling Veritrans offline installment?');
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     // Retrocompatibility
     $this->initContext();
 }
示例#16
0
 public function __construct()
 {
     $this->name = "debitnote";
     $this->tab = "payments_gateways";
     $this->version = '0.2.1';
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     parent::__construct();
     $this->page = basename(__FILE__, '.php');
     $this->displayName = $this->l('Debit Note Module');
     $this->description = $this->l('Accept Payment per Debit Note');
     $this->confirmUninstall = $this->l('Are you sure you want to delete your details? All Account Informations from your Customers will be lost!');
     if (!sizeof(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency set for this module');
     }
 }
 public function __construct()
 {
     $this->name = 'yamodule';
     $this->tab = 'payments_gateways';
     $this->version = '1.2.3';
     $this->author = 'Яндекс.Деньги';
     $this->need_instance = 1;
     $this->bootstrap = 1;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     parent::__construct();
     $this->displayName = $this->l('Y.CMS Prestashop');
     $this->description = $this->l('Яндекс.Деньги, Яндекс.Касса, Яндекс.Метрика, Яндекс.Маркет, Заказы в Маркете');
     $this->confirmUninstall = $this->l('Действительно удалить модуль?');
     if (!sizeof(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('Нет установленной валюты для вашего модуля!');
     }
 }
 public function __construct()
 {
     $this->name = 'paymentexample';
     $this->tab = 'payments_gateways';
     $this->version = '1.0.0';
     $this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
     $this->author = 'PrestaShop';
     $this->controllers = array('validation');
     $this->is_eu_compatible = 1;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('Payment Example');
     $this->description = $this->l('Description of Payment Example');
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
 }
 public function __construct()
 {
     $this->name = 'veritransbni';
     $this->tab = 'payments_gateways';
     $this->version = '1.0';
     $this->author = 'Veritrans';
     $this->bootstrap = true;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $this->veritrans_convenience_fee = 0;
     // key length must be between 0-32 chars to maintain compatibility with <= 1.5
     $this->config_keys = array('VN_CLIENT_KEY', 'VN_SERVER_KEY', 'VN_API_VERSION', 'VN_PAYMENT_TYPE', 'VN_3D_SECURE', 'VN_KURS', 'VN_CONVENIENCE_FEE', 'VN_PAYMENT_SUCCESS_STATUS_MAP', 'VN_PAYMENT_FAILURE_STATUS_MAP', 'VN_PAYMENT_CHALLENGE_STATUS_MAP', 'VN_ENVIRONMENT', 'VN_SANITIZED', 'VN_ENABLE_INSTALLMENT', 'VN_ENABLED_BNI_INSTALLMENT', 'VN_INSTALLMENTS_BNI', 'VN_INSTALLMENTS_MANDIRI');
     foreach (array('BNI', 'MANDIRI') as $bank) {
         foreach (array(3, 6, 12) as $months) {
             array_push($this->config_keys, 'VN_INSTALLMENTS_' . $bank . '_' . $months);
         }
     }
     $config = Configuration::getMultiple($this->config_keys);
     foreach ($this->config_keys as $key) {
         if (isset($config[$key])) {
             $this->{strtolower($key)} = $config[$key];
         }
     }
     if (isset($config['VN_KURS'])) {
         $this->veritrans_kurs = $config['VN_KURS'];
     } else {
         Configuration::set('VN_KURS', 10000);
     }
     Configuration::set('VN_API_VERSION', 2);
     Configuration::set('VN_PAYMENT_TYPE', 'vtweb');
     if (!isset($config['VN_SANITIZED'])) {
         Configuration::set('VN_SANITIZED', 0);
     }
     parent::__construct();
     $this->displayName = $this->l('Veritrans BNI Installments');
     $this->description = $this->l('Extends Veritrans payment method to accept payment using BNI Installments.');
     $this->confirmUninstall = $this->l('Are you sure about uninstalling Veritrans BNI Installments?');
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     // Retrocompatibility
     $this->initContext();
 }
 public function __construct()
 {
     $this->name = 'hipay_tpp';
     $this->tab = 'payments_gateways';
     $this->version = '1.3.0';
     $this->module_key = 'e25bc8f4f9296ef084abf448bca4808a';
     $this->author = 'HiPay';
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('HiPay Fullservice');
     $this->description = $this->l('Accept transactions worldwide on any device with local & international payment methods. Benefit from a next-gen fraud protection tool.');
     $this->confirmUninstall = $this->l('Are you sure you wish to uninstall HiPay Fullservice?');
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     if (!function_exists('curl_init')) {
         $this->warning = $this->l('You need to activate cURL for this module to work.');
     }
     $this->smarty->assign(array('hipay_version' => $this->version));
 }
示例#21
0
 public function __construct()
 {
     $this->name = 'bankbni';
     $this->tab = 'payments_gateways';
     $this->version = '1.0.8';
     $this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
     $this->author = 'Prestanesia';
     $this->controllers = array('payment', 'validation');
     $this->is_eu_compatible = 0;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array('BANK_BNI_DETAILS', 'BANK_BNI_OWNER', 'BANK_BNI_ADDRESS', 'BANK_BNI_RESERVATION_DAYS'));
     if (!empty($config['BANK_BNI_OWNER'])) {
         $this->owner = $config['BANK_BNI_OWNER'];
     }
     if (!empty($config['BANK_BNI_DETAILS'])) {
         $this->details = $config['BANK_BNI_DETAILS'];
     }
     if (!empty($config['BANK_BNI_ADDRESS'])) {
         $this->address = $config['BANK_BNI_ADDRESS'];
     }
     if (!empty($config['BANK_BNI_RESERVATION_DAYS'])) {
         $this->reservation_days = $config['BANK_BNI_RESERVATION_DAYS'];
     }
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->trans('Bank BNI', array(), 'Modules.BankBNI.Admin');
     $this->description = $this->trans('Accept payments for your products via Bank BNI transfer.', array(), 'Modules.BankBNI.Admin');
     $this->confirmUninstall = $this->trans('Are you sure about removing these details?', array(), 'Modules.BankBNI.Admin');
     if (!isset($this->owner) || !isset($this->details) || !isset($this->address)) {
         $this->warning = $this->trans('Account owner and account details must be configured before using this module.', array(), 'Modules.BankBNI.Admin');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->trans('No currency has been set for this module.', array(), 'Modules.BankBNI.Admin');
     }
     $this->extra_mail_vars = array('{bankbni_owner}' => Configuration::get('BANK_BNI_OWNER'), '{bankbni_details}' => nl2br(Configuration::get('BANK_BNI_DETAILS')), '{bankbni_address}' => nl2br(Configuration::get('BANK_BNI_ADDRESS')));
 }
示例#22
0
 public function __construct()
 {
     $this->name = 'weixinpay';
     $this->tab = 'payments_gateways';
     $this->version = '1.0.2';
     $this->author = 'Yiuked';
     $this->controllers = array('payment', 'return');
     $this->is_eu_compatible = 1;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $this->module_key = '3ec3536af1d608ffbd41748925a9fd55';
     $config = Configuration::getMultiple(array('WEIXIN_APPID', 'WEIXIN_MCH_ID', 'WEIXIN_NOTIFY_URL', 'WEIXIN_KEY'));
     if (!empty($config['WEIXIN_APPID'])) {
         $this->appid = $config['WEIXIN_APPID'];
     }
     if (!empty($config['WEIXIN_MCH_ID'])) {
         $this->mchid = $config['WEIXIN_MCH_ID'];
     }
     if (!empty($config['WEIXIN_KEY'])) {
         $this->wxkey = $config['WEIXIN_KEY'];
     }
     if (!empty($config['WEIXIN_NOTIFY_URL'])) {
         $this->notify = $config['WEIXIN_NOTIFY_URL'];
     }
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('WeChat Pay');
     $this->description = $this->l('Accept your products by tencent WeChat payment.');
     $this->confirmUninstall = $this->l('Are you sure about removing these details?');
     if (!isset($this->appid) || !isset($this->mchid) || !isset($this->wxkey) || !isset($this->notify)) {
         $this->warning = $this->l('Account all details must be configured before using this module.');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     $this->initOrderStatus();
 }
示例#23
0
 public static function hookExecPayment()
 {
     global $cart, $cookie;
     $hookArgs = array('cookie' => $cookie, 'cart' => $cart);
     $output = '';
     $result = self::getPaymentModules();
     if ($result) {
         foreach ($result as $module) {
             if ($moduleInstance = Module::getInstanceByName($module['name']) and is_callable(array($moduleInstance, 'hookpayment'))) {
                 if (!$moduleInstance->currencies or $moduleInstance->currencies and sizeof(Currency::checkPaymentCurrencies($moduleInstance->id))) {
                     $output .= call_user_func(array($moduleInstance, 'hookpayment'), $hookArgs);
                 }
             }
         }
     }
     return $output;
 }
示例#24
0
 public function __construct()
 {
     $this->name = 'amzpayments';
     $this->tab = 'payments_gateways';
     $this->version = '2.0.51';
     $this->author = 'patworx multimedia GmbH';
     $this->need_instance = 1;
     $this->bootstrap = true;
     $this->module_key = '26d778fa5cb6735a816107ce4345b32d';
     $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
     $this->dependencies = array();
     $this->is_eu_compatible = 1;
     $this->has_curl = function_exists('curl_version');
     $this->reloadConfigVars();
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     parent::__construct();
     $this->displayName = $this->l('Payments Advanced');
     $this->description = $this->l('Simple integration of Amazon Payments for your prestaShop.');
     $this->confirmUninstall = $this->l('Are you sure you want to uninstall?');
     if (!isset($this->merchant_id) || !isset($this->access_key) || !isset($this->secret_key) || !isset($this->region) || !isset($this->environment)) {
         $this->warning = $this->l('Your Amazon Payments details must be configured before using this module.');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this payment module');
     }
     if (isset($this->context->cookie->amz_access_token_set_time)) {
         if ($this->context->cookie->amz_access_token_set_time < time() - 3000) {
             unset($this->context->cookie->amz_access_token);
         }
     }
 }
 public function __construct()
 {
     $this->name = 'veritranspay';
     $this->tab = 'payments_gateways';
     $this->version = '1.0';
     $this->author = 'Veritrans';
     $this->bootstrap = true;
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $this->veritrans_convenience_fee = 0;
     // key length must be between 0-32 chars to maintain compatibility with <= 1.5
     $this->config_keys = array('VT_CLIENT_KEY', 'VT_SERVER_KEY', 'VT_API_VERSION', 'VT_PAYMENT_TYPE', 'VT_3D_SECURE', 'VT_KURS', 'VT_CONVENIENCE_FEE', 'VT_PAYMENT_SUCCESS_STATUS_MAP', 'VT_PAYMENT_FAILURE_STATUS_MAP', 'VT_PAYMENT_CHALLENGE_STATUS_MAP', 'VT_ENVIRONMENT', 'ENABLED_CREDIT_CARD', 'ENABLED_CIMB', 'ENABLED_MANDIRI', 'ENABLED_PERMATAVA', 'ENABLED_BRIEPAY', 'ENABLED_TELKOMSEL_CASH', 'ENABLED_XL_TUNAI', 'ENABLED_MANDIRI_BILL', 'ENABLED_BBM_MONEY', 'ENABLED_INDOMARET', 'ENABLED_INDOSAT_DOMPETKU', 'ENABLED_MANDIRI_ECASH', 'VT_SANITIZED', 'VT_ENABLE_INSTALLMENT', 'ENABLED_BNI_INSTALLMENT', 'ENABLED_MANDIRI_INSTALLMENT', 'VT_INSTALLMENTS_BNI', 'VT_INSTALLMENTS_MANDIRI');
     foreach (array('BNI', 'MANDIRI') as $bank) {
         foreach (array(3, 6, 12) as $months) {
             array_push($this->config_keys, 'VT_INSTALLMENTS_' . $bank . '_' . $months);
         }
     }
     $config = Configuration::getMultiple($this->config_keys);
     foreach ($this->config_keys as $key) {
         if (isset($config[$key])) {
             $this->{strtolower($key)} = $config[$key];
         }
     }
     if (isset($config['VT_KURS'])) {
         $this->veritrans_kurs = $config['VT_KURS'];
     } else {
         Configuration::set('VT_KURS', 10000);
     }
     Configuration::set('VT_API_VERSION', 2);
     Configuration::set('VT_PAYMENT_TYPE', 'vtweb');
     if (!isset($config['VT_SANITIZED'])) {
         Configuration::set('VT_SANITIZED', 0);
     }
     if (!isset($config['ENABLED_CREDIT_CARD'])) {
         Configuration::set('ENABLED_CREDIT_CARD', 0);
     }
     if (!isset($config['ENABLED_CIMB'])) {
         Configuration::set('ENABLED_CIMB', 0);
     }
     if (!isset($config['ENABLED_MANDIRI'])) {
         Configuration::set('ENABLED_MANDIRI', 0);
     }
     if (!isset($config['ENABLED_PERMATAVA'])) {
         Configuration::set('ENABLED_PERMATAVA', 0);
     }
     if (!isset($config['ENABLED_BRIEPAY'])) {
         Configuration::set('ENABLED_BRIEPAY', 0);
     }
     if (!isset($config['ENABLED_TELKOMSEL_CASH'])) {
         Configuration::set('ENABLED_TELKOMSEL_CASH', 0);
     }
     if (!isset($config['ENABLED_XL_TUNAI'])) {
         Configuration::set('ENABLED_XL_TUNAI', 0);
     }
     if (!isset($config['ENABLED_MANDIRI_BILL'])) {
         Configuration::set('ENABLED_MANDIRI_BILL', 0);
     }
     if (!isset($config['ENABLED_BBM_MONEY'])) {
         Configuration::set('ENABLED_BBM_MONEY', 0);
     }
     if (!isset($config['ENABLED_INDOMARET'])) {
         Configuration::set('ENABLED_INDOMARET', 0);
     }
     if (!isset($config['ENABLED_INDOSAT_DOMPETKU'])) {
         Configuration::set('ENABLED_INDOSAT_DOMPETKU', 0);
     }
     if (!isset($config['ENABLED_MANDIRI_ECASH'])) {
         Configuration::set('ENABLED_MANDIRI_ECASH', 0);
     }
     parent::__construct();
     $this->displayName = $this->l('Veritrans Pay');
     $this->description = $this->l('Accept payments for your products via Veritrans.');
     $this->confirmUninstall = $this->l('Are you sure about uninstalling Veritrans pay?');
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     // Retrocompatibility
     $this->initContext();
 }
示例#26
0
    public static function hookExecPayment()
    {
        global $cart, $cookie;
        $hookArgs = array('cookie' => $cookie, 'cart' => $cart);
        $id_customer = (int) $cookie->id_customer;
        $billing = new Address((int) $cart->id_address_invoice);
        $output = '';
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
		SELECT DISTINCT h.`id_hook`, m.`name`, hm.`position`
		FROM `' . _DB_PREFIX_ . 'module_country` mc
		LEFT JOIN `' . _DB_PREFIX_ . 'module` m ON m.`id_module` = mc.`id_module`
		INNER JOIN `' . _DB_PREFIX_ . 'module_group` mg ON (m.`id_module` = mg.`id_module`)
		INNER JOIN `' . _DB_PREFIX_ . 'customer_group` cg on (cg.`id_group` = mg.`id_group` AND cg.`id_customer` = ' . (int) $id_customer . ')
		LEFT JOIN `' . _DB_PREFIX_ . 'hook_module` hm ON hm.`id_module` = m.`id_module`
		LEFT JOIN `' . _DB_PREFIX_ . 'hook` h ON hm.`id_hook` = h.`id_hook`
		WHERE h.`name` = \'payment\'
		AND mc.id_country = ' . (int) $billing->id_country . '
		AND m.`active` = 1
		ORDER BY hm.`position`, m.`name` DESC');
        if ($result) {
            foreach ($result as $k => $module) {
                if ($moduleInstance = Module::getInstanceByName($module['name']) and is_callable(array($moduleInstance, 'hookpayment'))) {
                    if (!$moduleInstance->currencies or $moduleInstance->currencies and sizeof(Currency::checkPaymentCurrencies($moduleInstance->id))) {
                        $output .= call_user_func(array($moduleInstance, 'hookpayment'), $hookArgs);
                    }
                }
            }
        }
        return $output;
    }
示例#27
0
 private function _hookExecPaymentShip2pay($carrier)
 {
     $sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'shiptopay`';
     $result = Db::getInstance()->ExecuteS($sql);
     if (count($result) == 0) {
         return Module::hookExecPayment();
     } else {
         $hookArgs = array('cookie' => $this->context->cookie, 'cart' => $this->context->cart);
         $billing = new Address(intval($this->context->cart->id_address_invoice));
         $output = '';
         $sql = '
 		SELECT distinct(stp.id_carrier),h.`id_hook`, m.`name`, hm.`position`
 		FROM `' . _DB_PREFIX_ . 'module_country` mc
 		LEFT JOIN `' . _DB_PREFIX_ . 'module` m ON m.`id_module` = mc.`id_module`
 		LEFT JOIN `' . _DB_PREFIX_ . 'hook_module` hm ON hm.`id_module` = m.`id_module`
 		LEFT JOIN `' . _DB_PREFIX_ . 'hook` h ON hm.`id_hook` = h.`id_hook`
 		LEFT JOIN `' . _DB_PREFIX_ . 'shiptopay` stp ON hm.`id_module` = stp.`id_payment`
 		WHERE h.`name` = \'displayPayment\'
 		AND stp.id_carrier=' . intval($carrier) . '
 		AND mc.id_country = ' . intval($billing->id_country) . '
 		AND m.`active` = 1
 		ORDER BY hm.`position`, m.`name` DESC';
         $result = Db::getInstance()->ExecuteS($sql);
         if ($result) {
             foreach ($result as $k => $module) {
                 if ($moduleInstance = Module::getInstanceByName($module['name']) and is_callable(array($moduleInstance, 'hookpayment'))) {
                     $paymentCurrencies = Currency::checkPaymentCurrencies($moduleInstance->id);
                     $actualCurrencies = array();
                     foreach ($paymentCurrencies as $curr) {
                         $actualCurrencies[] = $curr['id_currency'];
                     }
                     if (!$moduleInstance->currencies or $moduleInstance->currencies and sizeof($paymentCurrencies) and in_array((int) $this->context->currency->id, $actualCurrencies)) {
                         $output .= call_user_func(array($moduleInstance, 'hookpayment'), $hookArgs);
                     }
                 }
             }
         }
         return $output;
     }
 }
 public static function preCall($module_name)
 {
     if (!parent::preCall($module_name)) {
         return false;
     }
     if ($module_instance = Module::getInstanceByName($module_name)) {
         /** @var PaymentModule $module_instance */
         if (!$module_instance->currencies || $module_instance->currencies && count(Currency::checkPaymentCurrencies($module_instance->id))) {
             return true;
         }
     }
     return false;
 }
示例#29
0
 /**
  * Module constructor
  * @throws PrestaShopException
  */
 public function __construct()
 {
     $this->name = 'pilipay';
     $this->tab = 'payments_gateways';
     $this->version = '1.2.9';
     $this->author = 'Pilibaba';
     $this->controllers = array('payment', 'validation');
     $this->is_eu_compatible = 0;
     // = 1; todo: what should I do to be compatible with EU?
     $this->ps_versions_compliancy = array('min' => '1.5.1', 'max' => _PS_VERSION_);
     $this->module_key = '1d52b16e6ed130c60b22ac7896f69bd2';
     $this->currencies = true;
     $this->currencies_mode = 'checkbox';
     $config = Configuration::getMultiple(array(self::PILIPAY_MERCHANT_NO, self::PILIPAY_APP_SECRET, self::PILIPAY_WAREHOUSES, self::PILIPAY_TESTMODE));
     if (!empty($config[self::PILIPAY_MERCHANT_NO])) {
         $this->merchantNo = $config[self::PILIPAY_MERCHANT_NO];
     }
     if (!empty($config[self::PILIPAY_APP_SECRET])) {
         $this->appSecret = $config[self::PILIPAY_APP_SECRET];
     }
     if (!empty($config[self::PILIPAY_CURRENCY])) {
         $this->currency = $config[self::PILIPAY_CURRENCY];
     }
     if (!empty($config[self::PILIPAY_WAREHOUSES])) {
         $this->warehouse = $config[self::PILIPAY_WAREHOUSES];
     }
     if (!empty($config[self::PILIPAY_TESTMODE])) {
         $this->testmode = $config[self::PILIPAY_TESTMODE];
     }
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('Pilipay');
     $this->description = $this->l('Pilibaba All-in-One gateway provides a unique combined Payment & Logistics solution & Customs compliance for eCommerce platforms to China market. By using Pilibaba service, merchants will be able to sell to 1.3 Billion Chinese customers instantly.Here are core benefits from Pilibaba for both merchants and Chinese customers.');
     $this->confirmUninstall = $this->l('Are you sure about removing these details?');
     if (empty($this->merchantNo) || empty($this->appSecret)) {
         $this->warning = $this->l('Merchant number and secret key must be configured before using this module.');
     }
     if (!count(Currency::checkPaymentCurrencies($this->id))) {
         $this->warning = $this->l('No currency has been set for this module.');
     }
     PilipayLogger::instance()->setHandler(array(__CLASS__, 'log'));
 }