Example #1
0
* 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 <*****@*****.**>
*  @copyright  2007-2011 PrestaShop SA
*  @version  Release: $Revision: 6698 $
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/ogone.php';
$ogone = new Ogone();
/* First we need to check var presence */
$neededVars = array('orderID', 'amount', 'currency', 'PM', 'ACCEPTANCE', 'STATUS', 'CARDNO', 'PAYID', 'NCERROR', 'BRAND', 'SHASIGN');
$params = '<br /><br />' . $ogone->l('Received parameters:') . '<br /><br />';
foreach ($neededVars as $k) {
    if (!isset($_GET[$k])) {
        die($ogone->l('Missing parameter:') . ' ' . $k);
    } else {
        $params .= $k . ' : ' . $_GET[$k] . '<br />';
    }
}
/* Then, load the customer cart and perform some checks */
$cart = new Cart((int) $_GET['orderID']);
if (Validate::isLoadedObject($cart)) {
    /* Fist, check for a valid SHA-1 signature */
    $ogoneParams = array();
    $ignoreKeyList = $ogone->getIgnoreKeyList();
    foreach ($_GET as $key => $value) {
        if (strtoupper($key) != 'SHASIGN' and $value != '' and !in_array($key, $ignoreKeyList)) {
Example #2
0
*
* 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 <*****@*****.**>
*  @copyright  2007-2011 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/ogone.php';
$ogone = new Ogone();
/* First we need to check var presence */
$neededVars = array('orderID', 'amount', 'currency', 'PM', 'ACCEPTANCE', 'STATUS', 'CARDNO', 'PAYID', 'NCERROR', 'BRAND', 'SHASIGN');
$params = '<br /><br />' . $ogone->l('Received parameters:') . '<br /><br />';
foreach ($neededVars as $k) {
    if (!isset($_GET[$k])) {
        die($ogone->l('Missing parameter:') . ' ' . $k);
    } else {
        $params .= Tools::safeOutput($k) . ' : ' . Tools::safeOutput($_GET[$k]) . '<br />';
    }
}
/* Then, load the customer cart and perform some checks */
$cart = new Cart((int) $_GET['orderID']);
if (Validate::isLoadedObject($cart)) {
    /* Fist, check for a valid SHA-1 signature */
    $ogoneParams = array();
    $ignoreKeyList = $ogone->getIgnoreKeyList();
    foreach ($_GET as $key => $value) {
        if (strtoupper($key) != 'SHASIGN' && $value != '' && !in_array($key, $ignoreKeyList)) {