// MERGE with 1.4 r7770
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7776 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -7,6 +7,6 @@
|
||||
<author><![CDATA[]]></author>
|
||||
<tab><![CDATA[payments_gateways]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -8,9 +8,6 @@ $_MODULE['<{ogone}prestashop>hookorderconfirmation_30163d8fc3068e8297e7ab5bf32ae
|
||||
$_MODULE['<{ogone}prestashop>hookorderconfirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Bei Fragen oder für weitere Informationen, kontaktieren Sie bitte unseren';
|
||||
$_MODULE['<{ogone}prestashop>hookorderconfirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'Kunden-Support';
|
||||
$_MODULE['<{ogone}prestashop>hookorderconfirmation_8de637e24570c1edb0357826a2ad5aea'] = 'Wir haben ein Problem bei Ihrer Bestellung festgestellt. Wenn Sie denken, dies sei ein Fehler, können Sie an unseren';
|
||||
$_MODULE['<{ogone}prestashop>ogone_75310bf8b7cf2ca4e09332871f98c271'] = 'Bezahlen Sie mit Ogone';
|
||||
$_MODULE['<{ogone}prestashop>ogone_51e550f8a0e9e127a566c21e9a15538b'] = 'Ogone Logo';
|
||||
$_MODULE['<{ogone}prestashop>ogone_15ee0c3bac84f0ff0a2af1e6cdc1a048'] = 'Bezahlen Sie sicher und schnell auf der nächsten Seite mit IDEAL / Mastercard / Visa / Paypal / Mister Cash / Bancontact.';
|
||||
$_MODULE['<{ogone}prestashop>ogone_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Konfiguration aktualisiert';
|
||||
$_MODULE['<{ogone}prestashop>ogone_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Hilfe';
|
||||
$_MODULE['<{ogone}prestashop>ogone_c3aace2676937d5cb50e536abbe9113d'] = 'Folgen Sie zunächst diesen Schritten:';
|
||||
@@ -31,7 +28,9 @@ $_MODULE['<{ogone}prestashop>ogone_650be61892bf690026089544abbd9d26'] = 'Modus';
|
||||
$_MODULE['<{ogone}prestashop>ogone_0cbc6611f5540bd0809a388dc95a615b'] = 'Test';
|
||||
$_MODULE['<{ogone}prestashop>ogone_756d97bb256b8580d4d71ee0c547804e'] = 'Betrieb';
|
||||
$_MODULE['<{ogone}prestashop>ogone_b17f3f4dcf653a5776792498a9b44d6a'] = 'Einstellungen aktualisieren';
|
||||
$_MODULE['<{ogone}prestashop>waiting_1fe3bb016fa11dd93fb1929f118fd492'] = 'Bitte warten, Ihre Bestellung wird bearbeitet ...';
|
||||
$_MODULE['<{ogone}prestashop>ogone_75310bf8b7cf2ca4e09332871f98c271'] = 'Bezahlen Sie mit Ogone';
|
||||
$_MODULE['<{ogone}prestashop>ogone_51e550f8a0e9e127a566c21e9a15538b'] = 'Ogone Logo';
|
||||
$_MODULE['<{ogone}prestashop>ogone_15ee0c3bac84f0ff0a2af1e6cdc1a048'] = 'Bezahlen Sie sicher und schnell auf der nächsten Seite mit IDEAL / Mastercard / Visa / Paypal / Mister Cash / Bancontact.';
|
||||
$_MODULE['<{ogone}prestashop>validation_e9f77209121063c8aedd7698f20f4878'] = 'Eingegangene Parameter:';
|
||||
$_MODULE['<{ogone}prestashop>validation_273e5454628021d87e34051074ac62d1'] = 'Fehlende Parameter:';
|
||||
$_MODULE['<{ogone}prestashop>validation_cbb285f0e88adea7d492a5b14b9e6d1d'] = 'Fehler (Auth. abgelehnt)';
|
||||
@@ -41,5 +40,4 @@ $_MODULE['<{ogone}prestashop>validation_a04830387e55082ed6096ab698ac8238'] = 'Un
|
||||
$_MODULE['<{ogone}prestashop>validation_7eaab6a852dfe4707acde8847dba7ce9'] = 'SHA-1 gegeben:';
|
||||
$_MODULE['<{ogone}prestashop>validation_8fbed6331a34a844224bfee15145e00f'] = 'SHA-1 berechnet:';
|
||||
$_MODULE['<{ogone}prestashop>validation_671c1f78cd9a17103c43a10d19157678'] = 'Voller Schlüssel';
|
||||
|
||||
?>
|
||||
$_MODULE['<{ogone}prestashop>waiting_1fe3bb016fa11dd93fb1929f118fd492'] = 'Bitte warten, Ihre Bestellung wird bearbeitet ...';
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -24,8 +24,6 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
class Ogone extends PaymentModule
|
||||
{
|
||||
@@ -36,7 +34,6 @@ class Ogone extends PaymentModule
|
||||
$this->name = 'ogone';
|
||||
$this->tab = 'payments_gateways';
|
||||
$this->version = '2.0';
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
@@ -142,6 +139,11 @@ class Ogone extends PaymentModule
|
||||
<div class="clear"> </div>';
|
||||
}
|
||||
|
||||
public function getIgnoreKeyList()
|
||||
{
|
||||
return $this->_ignoreKeyList;
|
||||
}
|
||||
|
||||
public function hookPayment($params)
|
||||
{
|
||||
global $smarty;
|
||||
@@ -165,7 +167,7 @@ class Ogone extends PaymentModule
|
||||
$ogoneParams['OWNERADDRESS'] = ($address->address1);
|
||||
$ogoneParams['OWNERCTY'] = $country->iso_code;
|
||||
$ogoneParams['OWNERTOWN'] = $address->city;
|
||||
$ogoneParams['paramplus'] = 'secure_key='.$params['cart']->secure_key;
|
||||
$ogoneParams['PARAMPLUS'] = 'secure_key='.$params['cart']->secure_key;
|
||||
if (!empty($address->phone))
|
||||
$ogoneParams['OWNERTELNO'] = $address->phone;
|
||||
|
||||
@@ -178,7 +180,7 @@ class Ogone extends PaymentModule
|
||||
$smarty->assign('ogone_params', $ogoneParams);
|
||||
$smarty->assign('OGONE_MODE', Configuration::get('OGONE_MODE'));
|
||||
|
||||
return $this->display(dirname(__FILE__), 'ogone.tpl');
|
||||
return $this->display(__FILE__, 'ogone.tpl');
|
||||
}
|
||||
|
||||
public function hookOrderConfirmation($params)
|
||||
@@ -195,7 +197,7 @@ class Ogone extends PaymentModule
|
||||
$context->smarty->assign('status', 'failed');
|
||||
|
||||
$context->smarty->assign('ogone_link', (method_exists($link, 'getPageLink') ? $context->link->getPageLink('contact', true) : Tools::getHttpHost(true).'contact'));
|
||||
return $this->display(dirname(__FILE__), 'hookorderconfirmation.tpl');
|
||||
return $this->display(__FILE__, 'hookorderconfirmation.tpl');
|
||||
}
|
||||
|
||||
public function validate($id_cart, $id_order_state, $amount, $message = '', $secure_key)
|
||||
@@ -216,6 +218,4 @@ class Ogone extends PaymentModule
|
||||
$pcc->add();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -49,9 +49,7 @@ if (Validate::isLoadedObject($cart))
|
||||
$ignoreKeyList = $ogone->getIgnoreKeyList();
|
||||
|
||||
foreach ($_GET as $key => $value)
|
||||
if (strtoupper($key) != 'SHASIGN' AND
|
||||
$value != '' AND
|
||||
!in_array($key, $ignoreKeyList))
|
||||
if (strtoupper($key) != 'SHASIGN' AND $value != '' AND !in_array($key, $ignoreKeyList))
|
||||
$ogoneParams[strtoupper($key)] = $value;
|
||||
|
||||
ksort($ogoneParams);
|
||||
@@ -66,16 +64,16 @@ if (Validate::isLoadedObject($cart))
|
||||
{
|
||||
case 1:
|
||||
/* Real error or payment canceled */
|
||||
$ogone->validate((int)$_GET['orderID'], _PS_OS_ERROR_, 0, $_GET['NCERROR'].$params, $_GET['secure_key']);
|
||||
$ogone->validate((int)$_GET['orderID'], Configuration::get('PS_OS_ERROR'), 0, $_GET['NCERROR'].$params, $_GET['secure_key']);
|
||||
break;
|
||||
case 2:
|
||||
/* Real error - authorization refused */
|
||||
$ogone->validate((int)$_GET['orderID'], _PS_OS_ERROR_, 0, $ogone->l('Error (auth. refused)').'<br />'.$_GET['NCERROR'].$params, $_GET['secure_key']);
|
||||
$ogone->validate((int)$_GET['orderID'], Configuration::get('PS_OS_ERROR'), 0, $ogone->l('Error (auth. refused)').'<br />'.$_GET['NCERROR'].$params, $_GET['secure_key']);
|
||||
break;
|
||||
case 5:
|
||||
case 9:
|
||||
/* Payment OK */
|
||||
$ogone->validate((int)$_GET['orderID'], _PS_OS_PAYMENT_, (float)($_GET['amount']), $ogone->l('Payment authorized / OK').$params, $_GET['secure_key']);
|
||||
$ogone->validate((int)$_GET['orderID'], Configuration::get('PS_OS_PAYMENT'), (float)($_GET['amount']), $ogone->l('Payment authorized / OK').$params, $_GET['secure_key']);
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
@@ -91,19 +89,18 @@ if (Validate::isLoadedObject($cart))
|
||||
// Send a new message and change the state
|
||||
$history = new OrderHistory();
|
||||
$history->id_order = $id_order;
|
||||
$history->changeIdOrderState(_PS_OS_ERROR_, $id_order);
|
||||
$history->changeIdOrderState(Configuration::get('PS_OS_ERROR'), $id_order);
|
||||
$history->addWithemail(true, array());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$ogone->validate((int)$_GET['orderID'], _PS_OS_ERROR_, (float)($_GET['amount']), $ogone->l('Unknown status:').' '.$_GET['STATUS'].$params, $_GET['secure_key']);
|
||||
$ogone->validate((int)$_GET['orderID'], Configuration::get('PS_OS_ERROR'), (float)($_GET['amount']), $ogone->l('Unknown status:').' '.$_GET['STATUS'].$params, $_GET['secure_key']);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = $ogone->l('Invalid SHA-1 signature').'<br />'.$ogone->l('SHA-1 given:').' '.$_GET['SHASIGN'].'<br />'.$ogone->l('SHA-1 calculated:').' '.$sha1.'<br />'.$ogone->l('Plain key:').' '.$shasign;
|
||||
$ogone->validate((int)$_GET['orderID'], _PS_OS_ERROR_, 0, $message.'<br />'.$params, $_GET['secure_key']);
|
||||
$ogone->validate((int)$_GET['orderID'], Configuration::get('PS_OS_ERROR'), 0, $message.'<br />'.$params, $_GET['secure_key']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user