@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>dibs</name>
|
||||
<displayName>DIBS</displayName>
|
||||
<version>1.0</version>
|
||||
<description>DIBS payment API</description>
|
||||
<author></author>
|
||||
<tab>payments_gateways</tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
</module>
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{dibs}prestashop>dibs_b508edd89d96e13df300b298143998d3'] = 'DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_ef3a95ad5c00ef1b4d1d73d2b50bf54c'] = 'DIBS Zahlung API';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f146cc67c82721f372d15664a9e4a0d6'] = 'Aus Sicherheitsgründen müssen Sie die Schlüssel Nr. 1 und 2, die von der MD5-Kontrolle von DIBS API verwendet werden, einstellen.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_94c824556baeddc9d8a31710c38fb045'] = 'Sie müssen Ihre Händler-ID einstellen, um DIBS API nutzen zu können.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Konfiguration aktualisiert';
|
||||
$_MODULE['<{dibs}prestashop>dibs_323d72a644340f9f2152febe46a52259'] = 'Ein DIBS-Konto erhalten';
|
||||
$_MODULE['<{dibs}prestashop>dibs_2981c3142099b5653c220ac6ed2620c4'] = 'Bitte klicken Sie auf den folgenden Link, um aus dem DIBS-Anmeldeformular zuzugreifen:';
|
||||
$_MODULE['<{dibs}prestashop>dibs_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Link';
|
||||
$_MODULE['<{dibs}prestashop>dibs_9a6126fa59acab742993a80fa0ca9340'] = 'Je nach Ihren Sprache und Länder-Regeln, kanndie Formular-Anmeldung unterschiedlich sein.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_d076f6d79396f176263a61ad3a1fe945'] = 'Bitte klicken Sie auf die entsprechende Flagge:';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen';
|
||||
$_MODULE['<{dibs}prestashop>dibs_794b8837b6ee6ddc4301f557915f9486'] = 'Logo-Farbe';
|
||||
$_MODULE['<{dibs}prestashop>dibs_44e1ec6255a91754e4911b16b9fc4d22'] = 'Die Grundfarbe des Logos, das auf der Zahlungsseite angezeigt wird.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_229a7ec501323b94db7ff3157a7623c9'] = 'Händler-ID';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b305acae66879c527cda4c4ded662585'] = 'Die von DIBS geschickte E-Mail sehen';
|
||||
$_MODULE['<{dibs}prestashop>dibs_310fc01b7a8c167aa514ccccc9e46e99'] = 'Sicherheitsschlüssel Nr. 1';
|
||||
$_MODULE['<{dibs}prestashop>dibs_247cc6885be1cb649d05acf81242cc35'] = 'Sicherheitsschlüssel Nr. 2';
|
||||
$_MODULE['<{dibs}prestashop>dibs_c7138fc31d63f966e368147a0cd4e55d'] = 'Diese Schlüssel werden für eine Verbesserung der Sicherheit eingesetzt.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b89642757f7199e37e74dd6a9a333733'] = 'Um diese Schlüssel zu erhalten, gehen auf die DIBS-Administrationsoberfläche zu Integration > MD5 Schlüsselmenü . Bitte stellen Sie sicher, dass die MD5-Kontrolle aktiviert ist, sonst funktioniert das Modul nicht .';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f9986472f2190b1ec04c52dd1eca1af4'] = 'Verwenden Sie das DIBS-Testmodul';
|
||||
$_MODULE['<{dibs}prestashop>dibs_313ada9ae4162978238c99d505bb6870'] = 'Sobald dieses Feld mitgeteilt ist, wird die Transaktion nicht zum Karteninhaber weitergeleitet, sondern wird anstattdessen vom DIBS-Testmodul bearbeitet.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_41f538d798be040c3710e4e128105ad2'] = 'Siehe auch Schritt 5 der 10 Schritt-Anleitung für weitere Informationen.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_9d0ac8297882a62456cd41249c36d9af'] = 'Während Ihrer ersten Integration mit DIBS ist es nicht nötig, diese Einstellung einzugeben, da sämtliche Standardtransaktionen zunächst auf das DIBS-Testsystem treffen, bis DIBS die Integration genehmigt hat. Falls das Testsystem zu einem späteren Zeitpunkt verwendet wird, wird dies bei DIBS aktiviert (kontaktieren Sie den DIBS-Support, um das Testmodul Ihres Shops zu reaktivieren).';
|
||||
$_MODULE['<{dibs}prestashop>dibs_58768109d694bef3c059544892118901'] = 'Flexwin-Farbe';
|
||||
$_MODULE['<{dibs}prestashop>dibs_37b0d284e5d29973b385ca537272ec38'] = 'Die Grundfarbe von FlexWin.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_2e2b79996d4fb73bff9b97725ddfbab8'] = 'Akzeptierte URL';
|
||||
$_MODULE['<{dibs}prestashop>dibs_0e260f9297ec338abbf671829d53c4ae'] = 'Die URL der Seite, die angezeigt werden soll, wenn der Kauf genehmigt ist.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_fcb9c3f1b9731de08442d81583782db7'] = 'Gelöschte URL';
|
||||
$_MODULE['<{dibs}prestashop>dibs_491f74497aaca60ae31a327d12d52925'] = 'Die URL der Seite, die angezeigt werden soll, wenn der Kunde den Zahlungsvorgang abbricht.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b17f3f4dcf653a5776792498a9b44d6a'] = 'Einstellungen aktualisieren';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b64af11b4f643164b0b418c716a6f7a0'] = 'Mit dibs zahlen';
|
||||
$_MODULE['<{dibs}prestashop>dibs_fda89beb6740540db1053016d96624c3'] = 'dibs Logo';
|
||||
$_MODULE['<{dibs}prestashop>dibs_eeaf35c1eb180cc38a77b892a96d7ed3'] = 'Bezahlen Sie sicher und schnell mit dibs.';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Ihre Bestellung vom';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'ist abgeschlossen.';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32aec87'] = 'Ihre Bestellung wird so schnell wie möglich zugeschickt.';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Bei Fragen oder für weitere Informationen, kontaktieren Sie bitte unseren';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'Kunden-Support';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Wir haben bei Ihrer Bestellung ein Problem festgestellt. Wenn Sie denken, dies sei ein Fehler, können Sie an unseren';
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,392 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class dibs extends PaymentModule
|
||||
{
|
||||
/**
|
||||
* @var string set the merchant id sent by DIBS e-mail after subscription
|
||||
* @staticvar
|
||||
*/
|
||||
public static $ID_MERCHANT;
|
||||
|
||||
/**
|
||||
* The URL of the page to be displayed if the purchase is approved.
|
||||
* @var string
|
||||
* @staticvar
|
||||
*/
|
||||
private static $ACCEPTED_URL = '';
|
||||
|
||||
/**
|
||||
* The URL of the page to be displayed if the customer cancels the payment.
|
||||
* @var string
|
||||
* @staticvar
|
||||
*/
|
||||
private static $CANCELLED_URL = '';
|
||||
|
||||
/**
|
||||
* Set the testing mode.
|
||||
* @var string
|
||||
*/
|
||||
private static $TESTING;
|
||||
|
||||
/**
|
||||
* define more settings values, set for new version which probably.
|
||||
* @var array
|
||||
*/
|
||||
public static $MORE_SETTINGS;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @staticvar
|
||||
*/
|
||||
private static $site_url;
|
||||
/**
|
||||
* Set the smarty object
|
||||
* @var Smarty
|
||||
*/
|
||||
private $smarty;
|
||||
|
||||
/**
|
||||
* Only this langs array are allowed in DIBS API
|
||||
* @var array
|
||||
*/
|
||||
private static $accepted_lang = array('da','en','es','fi','fo','fr','it','nl','no','pl','sv');
|
||||
|
||||
/**
|
||||
* Formular link to DIBS subscription
|
||||
* @var array
|
||||
*/
|
||||
public static $dibs_subscription_link = array(
|
||||
'en' => 'http://www.dibspayment.com/order/uk_request_2eng',
|
||||
'da' => 'http://www.dibs.dk/bestil/step1/?productid=234&producttype=240',
|
||||
'sv' => 'http://www.dibs.se/bestall/step1/?productid=339&producttype=340',
|
||||
'no' => 'http://www.dibs.no/bestill/step1/?productid=349&producttype=350',
|
||||
);
|
||||
public function __construct()
|
||||
{
|
||||
global $smarty;
|
||||
$this->smarty = $smarty;
|
||||
$this->name = 'dibs';
|
||||
$this->tab = 'payments_gateways';
|
||||
$this->version = '1.0';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('DIBS');
|
||||
$this->description = $this->l('DIBS payment API');
|
||||
|
||||
if (self::$site_url === NULL)
|
||||
self::$site_url = Tools::htmlentitiesutf8(Tools::getProtocol().$_SERVER['HTTP_HOST'].__PS_BASE_URI__);
|
||||
|
||||
self::$ID_MERCHANT = Configuration::get('DIBS_ID_MERCHANT');
|
||||
self::$ACCEPTED_URL = Configuration::get('DIBS_ACCEPTED_URL');
|
||||
self::$CANCELLED_URL = Configuration::get('DIBS_CANCELLED_URL');
|
||||
self::$TESTING = (int)Configuration::get('DIBS_TESTING');
|
||||
self::$MORE_SETTINGS = Configuration::get('DIBS_MORE_SETTINGS') != '' ? unserialize(Tools::htmlentitiesDecodeUTF8(Configuration::get('DIBS_MORE_SETTINGS'))) : array();
|
||||
|
||||
if (!isset(self::$MORE_SETTINGS['k1'])
|
||||
OR (isset(self::$MORE_SETTINGS['k1']) AND (self::$MORE_SETTINGS['k1'] === '' OR self::$MORE_SETTINGS['k2'] === '') ))
|
||||
$this->warning = $this->l('For security reasons, you must set key #1 and key #2 used by MD5 control of DIBS API.');
|
||||
if (!self::$ID_MERCHANT OR self::$ID_MERCHANT === '')
|
||||
$this->warning = $this->l('You have to set your merchant ID to use DIBS API.');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
return (parent::install()
|
||||
AND $this->registerHook('orderConfirmation')
|
||||
AND $this->registerHook('payment')
|
||||
AND Configuration::updateValue('DIBS_ACCEPTED_URL', self::$site_url.(substr(trim(self::$site_url), -1, 1) === '/' ? '' : '/').'order-confirmation.php')
|
||||
AND Configuration::updateValue('DIBS_CANCELLED_URL', self::$site_url)
|
||||
AND Configuration::updateValue('DIBS_TESTING', 1)
|
||||
AND Configuration::updateValue('DIBS_MORE_SETTINGS', Tools::htmlentitiesUTF8(serialize(array('flexwin_color' => 'blue', 'logo_color' => 'black', 'k1' => '', 'k2' => ''))), true));
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
return (parent::uninstall()
|
||||
AND Configuration::deleteByName('DIBS_ACCEPTED_URL')
|
||||
AND Configuration::deleteByName('DIBS_ID_MERCHANT')
|
||||
AND Configuration::deleteByName('DIBS_CANCELLED_URL')
|
||||
AND Configuration::deleteByName('DIBS_TESTING')
|
||||
AND Configuration::deleteByName('DIBS_MORE_SETTINGS'));
|
||||
}
|
||||
|
||||
public function hookOrderConfirmation($params)
|
||||
{
|
||||
if (!$this->active)
|
||||
return;
|
||||
if ($params['objOrder']->module != $this->name)
|
||||
return;
|
||||
|
||||
if ($params['objOrder']->valid)
|
||||
$this->smarty->assign(array('status' => 'ok', 'id_order' => $params['objOrder']->id));
|
||||
else
|
||||
$this->smarty->assign('status', 'failed');
|
||||
return $this->display(__FILE__, 'hookorderconfirmation.tpl');
|
||||
}
|
||||
|
||||
private function preProcess()
|
||||
{
|
||||
if (Tools::isSubmit('submitModule'))
|
||||
{
|
||||
self::$ID_MERCHANT = (Tools::getValue('idMerchant') !== '' ? Tools::getValue('idMerchant') : self::$ID_MERCHANT);
|
||||
self::$ACCEPTED_URL = ((Validate::isUrl(Tools::getValue('acceptedUrl'))) ? Tools::getValue('acceptedUrl') : self::$ACCEPTED_URL);
|
||||
self::$CANCELLED_URL = ((Validate::isUrl(Tools::getValue('cancelledUrl'))) ? Tools::getValue('cancelledUrl') : self::$CANCELLED_URL);
|
||||
self::$TESTING = (int)isset($_POST['testing']);
|
||||
self::$MORE_SETTINGS['flexwin_color'] = Tools::getValue('flexwin_color');
|
||||
self::$MORE_SETTINGS['logo_color'] = Tools::getValue('logo_color');
|
||||
self::$MORE_SETTINGS['k1'] = Tools::getValue('k1');
|
||||
self::$MORE_SETTINGS['k2'] = Tools::getValue('k2');
|
||||
|
||||
Configuration::updateValue('DIBS_ID_MERCHANT', self::$ID_MERCHANT);
|
||||
Configuration::updateValue('DIBS_ACCEPTED_URL', self::$ACCEPTED_URL);
|
||||
Configuration::updateValue('DIBS_CANCELLED_URL', self::$CANCELLED_URL);
|
||||
Configuration::updateValue('DIBS_TESTING', self::$TESTING);
|
||||
Configuration::updateValue('DIBS_MORE_SETTINGS', Tools::htmlentitiesUTF8(serialize(self::$MORE_SETTINGS)));
|
||||
|
||||
$data_sync = '';
|
||||
if(self::$ID_MERCHANT !== '' AND self::$TESTING !== 1 AND self::$MORE_SETTINGS['k1'] !== '' AND self::$MORE_SETTINGS['k2'] !== '')
|
||||
$data_sync = '<img src="http://www.prestashop.com/modules/dibs.png?site_id='.urlencode(self::$ID_MERCHANT).'" style="float:right" />';
|
||||
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').$data_sync.'</div>';
|
||||
}
|
||||
}
|
||||
private function _displayPresentation()
|
||||
{
|
||||
$href = '';
|
||||
if (isset(dibs::$dibs_subscription_link[Configuration::get('PS_LANG_DEFAULT')]))
|
||||
$href = dibs::$dibs_subscription_link[Configuration::get('PS_LANG_DEFAULT')];
|
||||
else
|
||||
$href = dibs::$dibs_subscription_link['en'];
|
||||
$out = '
|
||||
<fieldset class="width2">
|
||||
<legend><img src="../img/admin/contact.gif" />'.$this->l('Get a DIBS account').'</legend>
|
||||
<p>
|
||||
'.$this->l('Please click on the following link to access of DIBS formular subscription:')
|
||||
.' <a href="'.$href.'" class="link" target="_blank" >» '.$this->l('Link').' «</a>
|
||||
</p>
|
||||
<p>'
|
||||
.$this->l('Depending on language and country rules, formular subscription may be different.').'<br />'
|
||||
.$this->l('Please click on the appropriate flags:').' ';
|
||||
foreach (dibs::$dibs_subscription_link as $lang=>$url)
|
||||
{
|
||||
$out .= '<a href="'.$url.'" title="'.$lang.'" class="link" target="_blank" ><img src="'.dibs::$site_url.'modules/dibs/img/'.$lang.'.jpg" /></a>';
|
||||
}
|
||||
$out .= '
|
||||
</p>
|
||||
</fieldset>';
|
||||
return $out;
|
||||
}
|
||||
public function getContent()
|
||||
{
|
||||
$this->preProcess();
|
||||
|
||||
$flexwin_colors = array('sand', 'grey', 'blue');
|
||||
$logo_colors = array('yellow', 'grey', 'blue', 'black', 'purple', 'green');
|
||||
$str = '<h2>'.$this->displayName.'</h2>'
|
||||
.$this->_displayPresentation()
|
||||
.'<br />
|
||||
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<fieldset class="width2">
|
||||
<legend><img src="../img/admin/contact.gif" />'.$this->l('Settings').'</legend>
|
||||
<label>'.$this->l('Logo color').'<br /><br />
|
||||
<img src="'.self::$site_url.'modules/dibs/logos/dibs_'.self::$MORE_SETTINGS['logo_color'].'.jpg" />
|
||||
</label>
|
||||
<div class="margin-form">';
|
||||
foreach ($logo_colors as $logo_color)
|
||||
$str .= '<input type="radio" name="logo_color" '.(self::$MORE_SETTINGS['logo_color'] === $logo_color ? 'checked ' : '').'value="'.$logo_color.'" /> '.$logo_color.'<br />';
|
||||
$str .= ' <p>'.$this->l('The basic color of the logo which appears on the payment page.').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Merchant ID').' <sup>*</sup></label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="idMerchant" value="'.self::$ID_MERCHANT.'" />
|
||||
<p>'.$this->l('See the e-mail sent by DIBS.').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Secure Key #1').' <sup>*</sup></label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="k1" value="'.self::$MORE_SETTINGS['k1'].'" />
|
||||
</div>
|
||||
<label>'.$this->l('Secure Key #2').' <sup>*</sup></label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="k2" value="'.self::$MORE_SETTINGS['k2'].'" />
|
||||
<p>'.$this->l('These keys are used for security improvement.').'<br />'.$this->l('To obtain these keys, go to the DIBS administration interface and under \'Integration\', select the MD5 Keys menu. Please ensure the MD5 control is activated, otherwise the module will not work.').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Use DIBS test module').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="checkbox" name="testing" '.(self::$TESTING === 1 ? 'checked ' : '').'value="testing" />
|
||||
<p>'.$this->l('When this field is declared, the transaction is not dispatched to the card issuer, but is instead handled by the DIBS test module.')
|
||||
.$this->l('See also Step 5 of the 10 Step Guide for more information.')
|
||||
.' <a href="http://tech.dibs.dk/10_step_guide/your_own_test/" title="'.$this->l('See also Step 5 of the 10 Step Guide for more information.').'" target="_blank">> '.$this->l('Link').'</a><br />'
|
||||
.$this->l('During the initial integration with DIBS, there is no need to insert this parameter, since all default transactions will reach the DIBS test system until DIBS has approved integration. Should the test system be used at a later date, this will be activated at DIBS (contact DIBS support for reactivating the test mode of your shop).').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Flexwin color').'</label>
|
||||
<div class="margin-form">';
|
||||
foreach ($flexwin_colors as $flexwin_color)
|
||||
$str .= '<input type="radio" name="flexwin_color" '.(self::$MORE_SETTINGS['flexwin_color'] === $flexwin_color ? 'checked ' : '').'value="'.$flexwin_color.'" /> '.$flexwin_color.'<br />';
|
||||
$str .= ' <p>'.$this->l('The basic color theme of FlexWin.').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Accepted url').' <sup>*</sup></label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="acceptedUrl" value="'.self::$ACCEPTED_URL.'" />
|
||||
<p>'.$this->l('URL of the page to be displayed if the purchase is approved.').'</p>
|
||||
</div>
|
||||
<label>'.$this->l('Cancelled url').' <sup>*</sup></label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="cancelledUrl" value="'.self::$CANCELLED_URL.'" />
|
||||
<p>'.$this->l('URL of the page to be displayed if the customer cancels the payment.').'</p>
|
||||
</div>
|
||||
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
|
||||
</fieldset>
|
||||
</form>';
|
||||
return $str;
|
||||
}
|
||||
public function hookPayment($params)
|
||||
{
|
||||
if ((self::$ID_MERCHANT === false || self::$ID_MERCHANT === '' || self::$ID_MERCHANT === NULL)
|
||||
|| (self::$ACCEPTED_URL === false || self::$ACCEPTED_URL === '' || self::$ACCEPTED_URL === NULL))
|
||||
return '';
|
||||
|
||||
$currency = new Currency(intval($params['cart']->id_currency));
|
||||
$lang = new Language(intval($params['cart']->id_lang));
|
||||
$customer = new Customer(intval($params['cart']->id_customer));
|
||||
$address = new Address(intval($params['cart']->id_address_invoice));
|
||||
$country = new Country(intval($address->id_country), intval($params['cart']->id_lang));
|
||||
$products = $params['cart']->getProducts();
|
||||
|
||||
$dibsParams = array();
|
||||
|
||||
// Required
|
||||
$dibsParams['merchant'] = self::$ID_MERCHANT; // id merchant send from DIBS e-mail
|
||||
|
||||
// don't cast to int !! It has strange behaviour (really strange)
|
||||
// for example : When calculate a total amount of 557.05, the result is 55704 after casting !!
|
||||
$dibsParams['amount'] = $params['cart']->getOrderTotal(true, Cart::BOTH) * 100; // The smallest unit of an amount, cent for EUR
|
||||
$dibsParams['accepturl'] = self::$ACCEPTED_URL.'?id_cart='.(int)($params['cart']->id).'&id_module='.(int)($this->id).'&key='.$customer->secure_key; // The URL of the page to be displayed if the purchase is approved.
|
||||
$dibsParams['orderid'] = $params['cart']->id.'_'.date('YmdHis'); // The shop's order number for this particular puchase. It can be seen later when payment is captured, and will in some instances appear on the customer's bank statement (max. 50 characters, both numerals and letters may be used).
|
||||
$currency_num = 0;
|
||||
|
||||
// for 1.3 compatibility
|
||||
if(!isset($currency->iso_code_num) OR $currency->iso_code_num == '')
|
||||
{
|
||||
$array_currency_iso_num = array(
|
||||
'DKK' => 208,
|
||||
'EUR' => 978,
|
||||
'USD' => 840,
|
||||
'GBP' => 826,
|
||||
'SEK' => 752,
|
||||
'AUD' => 036,
|
||||
'CAD' => 124,
|
||||
'ISK' => 352,
|
||||
'JPY' => 392,
|
||||
'NZD' => 554,
|
||||
'NOK' => 578,
|
||||
'CHF' => 756,
|
||||
'TRY' => 949,
|
||||
);
|
||||
$currency_num = $array_currency_iso_num[$currency->iso_code];
|
||||
}
|
||||
else
|
||||
$currency_num = $currency->iso_code_num;
|
||||
$dibsParams['currency'] = (int)$currency_num; // Currency specification as indicated in ISO4217 where the EUR is no. 978
|
||||
|
||||
// optional
|
||||
$dibsParams['test'] = (self::$TESTING === 1) ? 'yes' : 'no'; // optional - This field is used when tests are being conducted on the shop (e.g. test=yes). When this field is declared, the transaction is not dispatched to the card issuer, but is instead handled by the DIBS test module. See also Step 5 of the 10 Step Guide for more information. During your initial integration with DIBS, there is no need to insert this parameter, since all default transactions will hit the DIBS test system until DIBS has approved integration. Should the test system be used at a later date, this will be activated at DIBS (contact DIBS support for reactivating the test mode of your shop).
|
||||
$dibsParams['lang'] = in_array(strtolower($lang->iso_code), self::$accepted_lang) ? $lang->iso_code : ''; // optional - This parameter determines the language in which the page will be opened. The following values are accepted: da=Danish en=English es=Spanish fi=Finnish fo=Faroese fr=French it=Italian nl=Dutch no=Norwegian pl=Polish (simplified) sv=Swedish Default language is Danish.
|
||||
$dibsParams['color'] = self::$MORE_SETTINGS['flexwin_color']; // optional - The basic color theme of FlexWin. There is currently a choice of "sand", "grey" and "blue". The default value is "blue".
|
||||
$dibsParams['cancelurl'] = self::$CANCELLED_URL; // optional - The URL of the page to be displayed if the customer cancels the payment.
|
||||
$dibsParams['uniqueoid'] = (int)($params['cart']->id).'_'.date('YmdHis').'_'.$params['cart']->secure_key; // optional - If this field exists, the orderid-field must be unique, i.e. there is no existing transaction with DIBS with the same order number. If such a transaction already exists, payment will be rejected with reason=7. Unless you are unable to generate unique order numbers, we strongly urge you to utilize this field.Note: Order numbers can be composed of a maximum of 50 characters (DIBS automatically removes surplus characters) and that uniqueoid is therefore unable to work as intended if order numbers consisting of more than 50 characters are used.
|
||||
$dibsParams['callbackurl'] = self::$site_url.'modules/'.$this->name.'/validation.php'; // optional - An optional �server-to-server� call which tells the shop�s server that payment was a success. Can be used for many purposes, the most important of these being the ability to register the order in your own system without depending on the customer�s browser hitting a specific page of the shop. See also HTTP_COOKIE.
|
||||
$dibsParams['HTTP_COOKIE'] = urlencode((string)serialize($params['cookie'])); // optional - Cookies/sessions which are to be sent to callbackurl. Must be sent along if you are using callbackurl and depend on cookies/sessions for keeping track of the user. Read how this is carried out in the description of automatic call-back further down this page.
|
||||
$md5_params = 'merchant='.self::$ID_MERCHANT.'&orderid='.$dibsParams['orderid'].'¤cy='.$dibsParams['currency'].'&amount='.$dibsParams['amount'];
|
||||
$dibsParams['md5key'] = md5(self::$MORE_SETTINGS['k2'].md5(self::$MORE_SETTINGS['k1'].$md5_params)); // optional - This variable enables a MD5 key control of the values received by DIBS. This control confirms that the values sent to DIBS has not been tampered with during the transfer. The MD5 key is calculated as: MD5(key2 + MD5(key1 + "merchant=&orderid=&transact=")) Where key1 and key2 are shop specific keys available through the DIBS administration interface, and + is the concatenation operator. NB! MD5 key check must also be enabled through the DIBS administration interface in order to work. Further details on MD5-key control.
|
||||
|
||||
// @todo need more infos.
|
||||
$dibsParams['account'] = ''; // optional - If multiple departments utilize the company's acquirer agreement with PBS, it may prove practical to keep the transactions separate at DIBS. An "account number" may be inserted in this field, so as to separate transactions at DIBS.
|
||||
$dibsParams['calcfee'] = ''; // optional - If this parameter is set (e.g. calcfee=foo), the charge due to the transaction will automatically be calculated and affixed, i.e., the charge payable to the acquirer (e.g. PBS)
|
||||
$dibsParams['capturenow'] = ''; // optional - If this field exists, an "instant capture" is carried out, i.e. the amount is immediately transferred from the customer's account to the shop's account. This function can only be utilized in the event that there is no actual physical delivery of any items. Contact DIBS when using this function. (Note that instant capture requires unique order numbers - also see the description of uniqueoid above).
|
||||
$dibsParams['ip'] = ''; // optional - DIBS retains the IP-number from which a card transaction is carried out. The IP-number is used for �fraud control�, etc. Some implementations may send the IP number of the shop to DIBS rather than that of the customer's machine. In order to provide the same services to shops which utilize such a program for their DIBS hookup, we offer the option of sending the "ip" parameter.
|
||||
$dibsParams['paytype'] = ''; // optional - Regarding the start-up of the DIBS FlexWin, the user can be limited to the use of just one particular payment form. This is accomplished by using the parameter "paytype". This function can be used if you wish for example to use integration method 3 for payment cards and method 1 for eDankort. Furthermore, this function can be used if you wish to control the user's selections of method of payment from your own website. You can also specify a list of payment methods that will be shown in the Flexwin. This list should be a comma separated with no spaces in between. Example: See our list of possible paytypes.
|
||||
$dibsParams['maketicket'] = ''; // optional - This parameter is intended for FlexWin, and actually performs two transactions. First it performs a regular authorisation. If, and only if, it is accepted, it is followed by a ticket registration. Both a transaction and a ticket value are returned to "accepturl" if it is specified. If "callbackurl" is specified, DIBS will perform two separate calls, corresponding to performing two transactions - one call to the regular authorisation, and another to the ticket registration. Both cases return a "transact" parameter value (e.g. transact="78901234"). In calls to "callbackurl" containing "preauth", the ticket value is composed of the "transact" parameter value. "maketicket" implicitly sets the "preauth" parameter - however, you should avoid to explicitly specify any "preauth" parameter. You cannot use "uniqueoid", "capturenow" or "md5key" along with "maketicket". Currently "maketicket" does not work with 3Dsecure.
|
||||
$dibsParams['postype'] = ''; // optional - "postype" (one 't') is used when one wishes to register the transaction origin. For normal internet transaction it is not required to include "postype", as it is automatically set to SSL. Possible values are: ssl = internet transactions, magnetic = magnetic stripe read, and signature is available, magnosig = magnetic stripe read, and no signature is available, mail = mail order, manual = manually entered, phone = phone order, signature = card and signature available, manually entered.
|
||||
$dibsParams['ticketrule'] = ''; // optional - Set the value of this parameter to the same as defined by you in DIBS Admin.
|
||||
$dibsParams['preauth'] = ''; // optional - When preauth=true is sent as part of the request to auth.cgi the DIBS server identifies the authorisation as a ticket authorisation rather than a normal transaction. Please note that the pre-authorised transaction is NOT available among the transactions in the DIBS administration interface. When using MD5 the Authkey must be calculated from the string transact=12345678&preauth=true¤cy=123
|
||||
|
||||
// @todo Since Prestashop manage vouchers, ask if necessary to use this params
|
||||
$dibsParams['voucher'] = ''; // optional - If set to "yes", then the list of payment types on the first page of FlexWin will contain vouchers, too. If FlexWin is called with a paytype, which would lead directly to the payment form, the customer is given the choice of entering a voucher code first.
|
||||
$dibsParams['split'] = ''; // optional - "split" is used for splitting up a transaction into two or more sub-transactions. This enables part of an order to be paid for when shipped in part. It requires that the amount and currency of the part payments are known at the time of the order, and are posted to the DIBS server as: split=2&amount1=&amount2=
|
||||
|
||||
// to erase optional params which are not filled
|
||||
$dibsParams = array_filter($dibsParams);
|
||||
|
||||
/* Order Information as "complex model" :
|
||||
* -------------------------------------- */
|
||||
|
||||
// delivery params
|
||||
$dibsParams['delivery1.Name'] = $address->firstname.' '.$address->lastname;
|
||||
$dibsParams['delivery2.Address'] = $address->address1;
|
||||
$dibsParams['delivery3.Address2'] = $address->address2;
|
||||
$dibsParams['delivery4.Postcode'] = $address->postcode;
|
||||
$dibsParams['delivery5.City'] = $address->city;
|
||||
$dibsParams['delivery6.Comment'] = $address->other;
|
||||
$dibsParams['delivery7.Phone'] = $address->phone;
|
||||
$dibsParams['delivery8.Company'] = $address->company;
|
||||
|
||||
// order line (product list)
|
||||
$dibsParams['ordline0-1'] = 'Product ref / Product Id';
|
||||
$dibsParams['ordline0-2'] = 'Name';
|
||||
$dibsParams['ordline0-3'] = 'Description';
|
||||
$dibsParams['ordline0-4'] = 'Unit price with tax';
|
||||
$dibsParams['ordline0-5'] = 'Total price with tax';
|
||||
$dibsParams['ordline0-6'] = 'Quantity';
|
||||
$dibsParams['ordline0-7'] = 'Weight';
|
||||
$dibsParams['ordline0-8'] = 'ecotax';
|
||||
|
||||
$count_products = 1;
|
||||
foreach ($products as $key => $product)
|
||||
{
|
||||
$dibsParams['ordline'.$count_products.'-1'] = 'ref.'.($product['reference'] != '' ? $product['reference'] : 'NC' ).'/id.'.$product['id_product'];
|
||||
$dibsParams['ordline'.$count_products.'-2'] = $product['name'];
|
||||
$dibsParams['ordline'.$count_products.'-3'] = strip_tags($product['description_short']);
|
||||
$dibsParams['ordline'.$count_products.'-4'] = $product['price_wt'];
|
||||
$dibsParams['ordline'.$count_products.'-5'] = $product['total_wt'];
|
||||
$dibsParams['ordline'.$count_products.'-6'] = $product['cart_quantity'];
|
||||
$dibsParams['ordline'.$count_products.'-7'] = $product['weight'];
|
||||
$dibsParams['ordline'.$count_products.'-8'] = $product['ecotax'];
|
||||
$count_products++;
|
||||
}
|
||||
|
||||
// Price info
|
||||
$dibsParams['priceinfo1.Deliverycosts'] = $params['cart']->getOrderTotal(true, Cart::ONLY_SHIPPING);
|
||||
$dibsParams['priceinfo2.ProductsAmount'] = $params['cart']->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);
|
||||
$dibsParams['priceinfo3.AmountWithoutTax'] = $params['cart']->getOrderTotal(false, Cart::BOTH);
|
||||
$dibsParams['priceinfo4.AmountTotalTax'] = (float)($params['cart']->getOrderTotal(true, Cart::BOTH) - $params['cart']->getOrderTotal(false, Cart::BOTH));
|
||||
$this->smarty->assign('p', $dibsParams);
|
||||
$this->smarty->assign('logo_color', self::$MORE_SETTINGS['logo_color']);
|
||||
return $this->display(__FILE__, 'dibs.tpl');
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<p class="payment_module">
|
||||
<a href="javascript:document.dibs_form.submit();" title="{l s='Pay with dibs' mod='dibs'}" style="height:48px">
|
||||
<span style="height:40px;width:86px;float:left"><img src="{$module_dir}logos/dibs_{$logo_color}.jpg" alt="{l s='dibs logo' mod='dibs'}" /></span>
|
||||
<span style="width:350px;float:left;margin-left:10px"><strong>{l s='Pay with dibs' mod='dibs'}</strong><br />{l s='Pay safely and quickly with dibs.' mod='dibs'}</span>
|
||||
<div style="clear:both;height:0;line-height:0"> </div>
|
||||
</a>
|
||||
<div style="clear:both;height:0;line-height:0"> </div>
|
||||
</p>
|
||||
<form name="dibs_form" action="https://payment.architrade.com/paymentweb/start.action" method="post">
|
||||
{foreach from=$p key=k item=v}
|
||||
<input type="hidden" name="{$k}" value="{$v}" />
|
||||
{/foreach}
|
||||
</form>
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{dibs}prestashop>dibs_b508edd89d96e13df300b298143998d3'] = 'DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_ef3a95ad5c00ef1b4d1d73d2b50bf54c'] = 'DIBS API de pago';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f146cc67c82721f372d15664a9e4a0d6'] = 'Por razones de seguridad, debe grabar las claves 1 y 2 utilizadas por el control MD de el API de DIBS.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_94c824556baeddc9d8a31710c38fb045'] = 'Debe registrar su ID vendedor para utilizar el API de DIBS.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuración modificada';
|
||||
$_MODULE['<{dibs}prestashop>dibs_323d72a644340f9f2152febe46a52259'] = 'Obtenir una cuenta DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_2981c3142099b5653c220ac6ed2620c4'] = 'Pulse en el siguiente link para acceder al formulario de inscripción DIBS:';
|
||||
$_MODULE['<{dibs}prestashop>dibs_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Link';
|
||||
$_MODULE['<{dibs}prestashop>dibs_9a6126fa59acab742993a80fa0ca9340'] = 'Según su idioma y la legislación de su país, el formulario de inscripción puede ser diferente.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_d076f6d79396f176263a61ad3a1fe945'] = 'Pulse en la bandera correspondiente:';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuraciones';
|
||||
$_MODULE['<{dibs}prestashop>dibs_794b8837b6ee6ddc4301f557915f9486'] = 'Color del logo';
|
||||
$_MODULE['<{dibs}prestashop>dibs_44e1ec6255a91754e4911b16b9fc4d22'] = 'El color básico del logo que aparece en la página de pago';
|
||||
$_MODULE['<{dibs}prestashop>dibs_229a7ec501323b94db7ff3157a7623c9'] = 'id del vendedor';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b305acae66879c527cda4c4ded662585'] = 'Mirar el email enviado por DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_310fc01b7a8c167aa514ccccc9e46e99'] = 'Clave de seguridad n°1';
|
||||
$_MODULE['<{dibs}prestashop>dibs_247cc6885be1cb649d05acf81242cc35'] = 'Clave de seguridad n°2';
|
||||
$_MODULE['<{dibs}prestashop>dibs_c7138fc31d63f966e368147a0cd4e55d'] = 'Estas claves se utilizan para mejorar la seguridad.Estas claves se utilizan para mejorar la seguridad.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b89642757f7199e37e74dd6a9a333733'] = 'Para obtener estas claves ir a la interfaz de administración DIBS y a Integración > Menú de claves MD5. Por favor, asegúrese de que el control MD5 esté activo, de lo contrario el módulo no funcionará.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f9986472f2190b1ec04c52dd1eca1af4'] = 'Utilizar el módulo de test de DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_313ada9ae4162978238c99d505bb6870'] = 'Cuando este campo está declarado, la transacción no se envía al remitente de la carta sino al módulo de test de Twenga.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_41f538d798be040c3710e4e128105ad2'] = 'Mirar también la etapa 5 de la guía en 10 etapas para más información.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_9d0ac8297882a62456cd41249c36d9af'] = 'Durante su primera integración con DIBS, no necesita utilizar dicho parámetro, ya que todas las transacciones por defecto van a utilizar el sistema de test hasta que la integración del sitio no haya sido aprobada por DIBS. Si el sistema de test debe utilizarse posteriormente, puede activarse en DIBS (contacte con el soporte DIBS para reactivar el modo de test en su tienda)';
|
||||
$_MODULE['<{dibs}prestashop>dibs_58768109d694bef3c059544892118901'] = 'Color de Flexwin';
|
||||
$_MODULE['<{dibs}prestashop>dibs_37b0d284e5d29973b385ca537272ec38'] = 'El color del tema de Flexwi';
|
||||
$_MODULE['<{dibs}prestashop>dibs_2e2b79996d4fb73bff9b97725ddfbab8'] = 'Url de aceptación';
|
||||
$_MODULE['<{dibs}prestashop>dibs_0e260f9297ec338abbf671829d53c4ae'] = 'La URL de la página que aparece si el pago es aceptado.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_fcb9c3f1b9731de08442d81583782db7'] = 'Anular la URL';
|
||||
$_MODULE['<{dibs}prestashop>dibs_491f74497aaca60ae31a327d12d52925'] = 'La URL de la página que aparecerá si el usuario anula el pago';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b17f3f4dcf653a5776792498a9b44d6a'] = 'Modificar las configuraciones';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b64af11b4f643164b0b418c716a6f7a0'] = 'Pagar con DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_fda89beb6740540db1053016d96624c3'] = 'Logo de DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_eeaf35c1eb180cc38a77b892a96d7ed3'] = 'Pagar rápidamente de manera segura con DIBS';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Su pedido en';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'está terminado.';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32aec87'] = 'Le enviaremos su pedido cuanto antes.';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Para cualquier pregunta o para más información, póngase en contacto con nuestro';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'servicio clientela';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Hemos observado un problema con su pedido. Si piensa que se trata de un error, puede ponerse en contacto con nuestro';
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{dibs}prestashop>dibs_b508edd89d96e13df300b298143998d3'] = 'DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_ef3a95ad5c00ef1b4d1d73d2b50bf54c'] = 'DIBS API de paiement';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f146cc67c82721f372d15664a9e4a0d6'] = 'Pour des raisons de sécurité, vous devez enregistrer les clefs numéro 1 et 2 utilisées par le controle MD de l\'API DIBS.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_94c824556baeddc9d8a31710c38fb045'] = 'Vous devez enregistrer votre ID marchand pour utiliser l\'API de DIBS.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration modifié';
|
||||
$_MODULE['<{dibs}prestashop>dibs_323d72a644340f9f2152febe46a52259'] = 'Obtenir un compte DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_2981c3142099b5653c220ac6ed2620c4'] = 'Veuillez cliquer sur le lien suivant pour accéder au formulaire de souscription DIBS :';
|
||||
$_MODULE['<{dibs}prestashop>dibs_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Lien';
|
||||
$_MODULE['<{dibs}prestashop>dibs_9a6126fa59acab742993a80fa0ca9340'] = 'Selon votre langage et les lois de votre pays, le formulaire de souscription pourrait être différent.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_d076f6d79396f176263a61ad3a1fe945'] = 'Veuillez cliquer sur le drapeau approprié :';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f4f70727dc34561dfde1a3c529b6205c'] = 'Configurations';
|
||||
$_MODULE['<{dibs}prestashop>dibs_794b8837b6ee6ddc4301f557915f9486'] = 'Couleur du logo';
|
||||
$_MODULE['<{dibs}prestashop>dibs_44e1ec6255a91754e4911b16b9fc4d22'] = 'La couleur basique du logo qui apparait sur la page de paiement';
|
||||
$_MODULE['<{dibs}prestashop>dibs_229a7ec501323b94db7ff3157a7623c9'] = 'id du Marchand';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b305acae66879c527cda4c4ded662585'] = 'Regarder l\'e-mail envoyé par DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_310fc01b7a8c167aa514ccccc9e46e99'] = 'Clé de sécurité n°1';
|
||||
$_MODULE['<{dibs}prestashop>dibs_247cc6885be1cb649d05acf81242cc35'] = 'Clé de sécurité n°2';
|
||||
$_MODULE['<{dibs}prestashop>dibs_c7138fc31d63f966e368147a0cd4e55d'] = 'Ces clefs sont utilisées pour améliorer la sécurité.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b89642757f7199e37e74dd6a9a333733'] = 'Afin de récupérer ces clefs, rendez-vous sur l\'interface d\'administration de DIBS, dans le menu \"Integration\" > \"MD5 keys\". N\'oubliez pas de vérifier si le contrôle MD5 est activé, auquel cas le module ne sera pas opérationnel.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f9986472f2190b1ec04c52dd1eca1af4'] = 'Utiliser le module de test de DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_313ada9ae4162978238c99d505bb6870'] = 'Quand ce champ est déclaré, la transaction n\'est pas envoyée à l\'émetteur de la carte, mais est envoyé au module de test de DIBS.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_41f538d798be040c3710e4e128105ad2'] = 'Regarder aussi l\'étape 5 du guide en 10 étapes pour plus d\'informations.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_9d0ac8297882a62456cd41249c36d9af'] = 'Lors de votre première intégration avec DIBS, vous n\'avez pas besoin d\'utiliser ce paramètre, puisque toute les transactions par défaut vont utiliser le système de test tant que l\'intégration du site n\'a pas été approuvée par DIBS. Si le système de test doit être utilisé plus tard, il peut être activé chez DIBS (contactez le support DIBS pour réactiver le mode de test sur votre boutique)';
|
||||
$_MODULE['<{dibs}prestashop>dibs_58768109d694bef3c059544892118901'] = 'Couleur de Flexwin';
|
||||
$_MODULE['<{dibs}prestashop>dibs_37b0d284e5d29973b385ca537272ec38'] = 'La couleur du thême de Flexwin';
|
||||
$_MODULE['<{dibs}prestashop>dibs_2e2b79996d4fb73bff9b97725ddfbab8'] = 'Url d\'acceptation';
|
||||
$_MODULE['<{dibs}prestashop>dibs_0e260f9297ec338abbf671829d53c4ae'] = 'L\'url de la page qui sera appelé une fois le paiement accepté.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_fcb9c3f1b9731de08442d81583782db7'] = 'Url d\'annulation';
|
||||
$_MODULE['<{dibs}prestashop>dibs_491f74497aaca60ae31a327d12d52925'] = 'L\'url de la page qui sera appelé si l\'utilisateur annule le paiement';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b17f3f4dcf653a5776792498a9b44d6a'] = 'Modifier les configurations';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b64af11b4f643164b0b418c716a6f7a0'] = 'Payer avec DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_fda89beb6740540db1053016d96624c3'] = 'Logo de DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_eeaf35c1eb180cc38a77b892a96d7ed3'] = 'Payer rapidement et de manière sécurisé avec DIBS';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'est terminée. ';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32aec87'] = 'Votre commande vous sera envoyée dès que possible. ';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou pour de plus amples renseignements, merci de communiquer avec notre ';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'service client';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Nous avons remarqué un problème avec votre commande. Si vous pensez que c\'est une erreur, vous pouvez contacter notre';
|
||||
@@ -1,11 +0,0 @@
|
||||
{if $status == 'ok'}
|
||||
<p>{l s='Your order on' mod='dibs'} <span class="bold">{$shop_name}</span> {l s='is complete.' mod='dibs'}
|
||||
<br /><br /><span class="bold">{l s='Your order will be sent as soon as possible.' mod='dibs'}</span>
|
||||
<br /><br />{l s='For any questions or for further information, please contact our' mod='dibs'} <a href="{$base_dir_ssl}contact-form.php">{l s='customer support' mod='dibs'}</a>.
|
||||
</p>
|
||||
{else}
|
||||
<p class="warning">
|
||||
{l s='We noticed a problem with your order. If you think this is an error, you can contact our' mod='dibs'}
|
||||
<a href="{$base_dir_ssl}contact-form.php">{l s='customer support' mod='dibs'}</a>.
|
||||
</p>
|
||||
{/if}
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 665 B |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{dibs}prestashop>dibs_b508edd89d96e13df300b298143998d3'] = 'DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_ef3a95ad5c00ef1b4d1d73d2b50bf54c'] = 'DIBS pagamento API';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f146cc67c82721f372d15664a9e4a0d6'] = 'Per ragioni di sicurezza devi impostare la chiave n. 1 e n. 2 utilizzate dal controllo MD5 di DIBS API.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_94c824556baeddc9d8a31710c38fb045'] = 'Devi impostare il tuo ID commerciante per utilizzare DIBS API.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configurazione aggiornata';
|
||||
$_MODULE['<{dibs}prestashop>dibs_323d72a644340f9f2152febe46a52259'] = 'Ottieni un account DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_2981c3142099b5653c220ac6ed2620c4'] = 'Clicca sul link seguente per accedere al modulo di abbonamento DIBS :';
|
||||
$_MODULE['<{dibs}prestashop>dibs_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Link';
|
||||
$_MODULE['<{dibs}prestashop>dibs_9a6126fa59acab742993a80fa0ca9340'] = 'A seconda della lingua e delle regole del tuo paese, il modulo di sottoscrizione potrebbe essere diverso.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_d076f6d79396f176263a61ad3a1fe945'] = 'Clicca sulle bandiere corrette:';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni';
|
||||
$_MODULE['<{dibs}prestashop>dibs_794b8837b6ee6ddc4301f557915f9486'] = 'Colore logo';
|
||||
$_MODULE['<{dibs}prestashop>dibs_44e1ec6255a91754e4911b16b9fc4d22'] = 'Il colore di base del logo che appare sulla pagina di pagamento.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_229a7ec501323b94db7ff3157a7623c9'] = 'ID commerciante';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b305acae66879c527cda4c4ded662585'] = 'Vedi l\'e-mail inviata da DIBS.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_310fc01b7a8c167aa514ccccc9e46e99'] = 'Chiave di sicurezza n. 1';
|
||||
$_MODULE['<{dibs}prestashop>dibs_247cc6885be1cb649d05acf81242cc35'] = 'Chiave di sicurezza n. 2';
|
||||
$_MODULE['<{dibs}prestashop>dibs_c7138fc31d63f966e368147a0cd4e55d'] = 'Queste chiavi sono usate per migliorare la sicurezza.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b89642757f7199e37e74dd6a9a333733'] = 'Per ottenere queste chiavi vai all\'interfaccia di amministrazione DIBS e nel menu Integrazione > chiavi MD5 . Assicurati che il controllo MD5 sia attivato, altrimenti il modulo non funzionerà.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_f9986472f2190b1ec04c52dd1eca1af4'] = 'Usa il modulo di test DIBS';
|
||||
$_MODULE['<{dibs}prestashop>dibs_313ada9ae4162978238c99d505bb6870'] = 'Quando questo campo è dichiarato, la transazione non viene inviata all\'emittente della carta, ma è invece gestita dal modulo di prova DIBS.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_41f538d798be040c3710e4e128105ad2'] = 'Per ulteriori informazioni vedi anche la Fase 5 della Guida in 10 Fasi.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_9d0ac8297882a62456cd41249c36d9af'] = 'Durante la tua prima integrazione con DIBS, non vi è alcuna necessità di inserire questo parametro, dal momento che tutte le operazioni di default riguarderanno il sistema di test DIBS fino a che DIBS ha approvato l\'integrazione. Qualora il sistema di test fosse utilizzato in un secondo momento, questo sarà attivato a DIBS (contatta il supporto DIBS per riattivare la modalità di prova del tuo negozio) .';
|
||||
$_MODULE['<{dibs}prestashop>dibs_58768109d694bef3c059544892118901'] = 'Colore Flexwin ';
|
||||
$_MODULE['<{dibs}prestashop>dibs_37b0d284e5d29973b385ca537272ec38'] = 'Il tema colore base di FlexWin.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_2e2b79996d4fb73bff9b97725ddfbab8'] = 'Url accettato';
|
||||
$_MODULE['<{dibs}prestashop>dibs_0e260f9297ec338abbf671829d53c4ae'] = 'L\'URL della pagina da visualizzare se l\'acquisto è approvato.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_fcb9c3f1b9731de08442d81583782db7'] = 'Url annullato ';
|
||||
$_MODULE['<{dibs}prestashop>dibs_491f74497aaca60ae31a327d12d52925'] = 'L\'URL della pagina da visualizzare se il cliente annulla il pagamento.';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b17f3f4dcf653a5776792498a9b44d6a'] = 'Aggiorna le impostazioni';
|
||||
$_MODULE['<{dibs}prestashop>dibs_b64af11b4f643164b0b418c716a6f7a0'] = 'Paga con dibs';
|
||||
$_MODULE['<{dibs}prestashop>dibs_fda89beb6740540db1053016d96624c3'] = 'logo dibs';
|
||||
$_MODULE['<{dibs}prestashop>dibs_eeaf35c1eb180cc38a77b892a96d7ed3'] = 'Paga in modo sicuro e veloce con dibs.';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Il tuo ordine ';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'è completo.';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32aec87'] = 'Il tuo ordine verrà inviato al più presto.';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Per eventuali domande o per ulteriori informazioni, contatta la nostra';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'assistenza clienti';
|
||||
$_MODULE['<{dibs}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Abbiamo notato un problema con il tuo ordine. Se pensi che sia un errore, contatta la nostra';
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
|
||||
include(dirname(__FILE__). '/../../config/config.inc.php');
|
||||
include(dirname(__FILE__).'/dibs.php');
|
||||
|
||||
$posted_values = array();
|
||||
$errors = array();
|
||||
$obj_dibs = new dibs();
|
||||
$required_fields = array('orderid', 'paytype', 'transact', 'HTTP_COOKIE', 'merchant', 'uniqueoid', 'amount', 'currency', 'authkey');
|
||||
$valid_order = true;
|
||||
if (count($_POST))
|
||||
{
|
||||
$posted_values = $_POST;
|
||||
|
||||
foreach ($required_fields AS $field)
|
||||
if (!isset($posted_values[$field]))
|
||||
$errors[] = 'Missing field '.$field;
|
||||
|
||||
$posted_values['cookie'] = unserialize(urldecode($posted_values['HTTP_COOKIE']));
|
||||
|
||||
$secure_cart = explode('_', $posted_values['uniqueoid']);
|
||||
$arr_order_id = explode('_',$posted_values['orderid']);
|
||||
$posted_values['orderid'] = $arr_order_id[0];
|
||||
|
||||
if ($posted_values['cookie']->id_cart != ($posted_values['orderid'] || $secure_cart[0]))
|
||||
$errors[] = Tools::displayErrors('The order you want to validate is not Allow.');
|
||||
if (!$posted_values['cookie']->isLogged())
|
||||
$errors[] = Tools::displayError('Your login account does not allow');
|
||||
if ((string)$posted_values['merchant'] !== (string)dibs::$ID_MERCHANT)
|
||||
$errors[] = Tools::displayError('You did not use the correct merchant ID.');
|
||||
|
||||
$md5_key = md5(dibs::$MORE_SETTINGS['k2'].md5(dibs::$MORE_SETTINGS['k1'].'transact='.$posted_values['transact'].'&amount='.$posted_values['amount'].'¤cy='.$posted_values['currency']));
|
||||
if((string)$posted_values['authkey'] !== $md5_key)
|
||||
$errors[] = Tools::displayError('Your are not allowed to validate the command for security reasons.');
|
||||
|
||||
$message = '';
|
||||
foreach ($posted_values AS $key => $value)
|
||||
if (is_string($value) AND in_array($key, $required_fields) AND $key !== 'HTTP_COOKIE')
|
||||
$message .= $key.': '.$value."\n";
|
||||
if (sizeof($errors))
|
||||
{
|
||||
$message .= sizeof($errors).' error(s):'."\n";
|
||||
$valid_order = false;
|
||||
}
|
||||
|
||||
foreach ($errors AS $error)
|
||||
$message .= $error."\n";
|
||||
$message = nl2br(strip_tags($message));
|
||||
if ($valid_order === true)
|
||||
$obj_dibs->validateOrder((int)$posted_values['orderid'], _PS_OS_PAYMENT_, (float)((int)$posted_values['amount'] / 100), $obj_dibs->displayName, $message, array(), NULL, false, $secure_cart[2]);
|
||||
if ($valid_order === false)
|
||||
$obj_dibs->validateOrder((int)$posted_values['orderid'], _PS_OS_ERROR_, 0, $obj_dibs->displayName, $message, array(), NULL, false, $secure_cart[2]);
|
||||
}
|
||||