osCommerce France : Accueil Forum Portail osCommerce France Réponses aux questions Foire aux contributions

Bienvenue invité ( Connexion | Inscription )

 
Reply to this topicStart new topic
> cmcic - cgi2 not ok, erreur sur cmcic_response.php
albator06
posté 21 Mar 2012, 16:49
Message #1


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 1
Inscrit : 21-March 12
Membre no 30768



osCommerce Online Merchant v2.2 RC1 W3C Valid FR
serveur : ovh
module osCommerce CMCiC / CyberMut - cmcic_contrib_3.0c


Bonjour, j'ai besoin de votre aide pour un probleme de Code retour : CGI2 : NOT OK

Voila la page de retour (apparemment non valide) : http://www.site_pas_cite.fr/shop/cmcic_response.php

Le message d'erreur que la banque me donne :

Code
<br />
<b>Warning</b>: require(includes/languages/.php) [<a href='function.require?osCsid=629a25f558cdec357a991906ff64e094'>function.require</a>]: failed to open stream: No such file or directory in
<b>/homez.xxx/site_pas_cite/www/shop/cmcic_response.php</b> on line
<b>118</b><br /><br />
<b>Fatal error</b>: require() [<a href='function.require?osCsid=629a25f558cdec357a991906ff64e094'>function.require</a>]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/lib/php') in
<b>/homez.xxx/site_pas_cite/www/shop/cmcic_response.php</b> on line
<b>118</b><br />



Je ne sais que faire, je ne suis pas un crack en développement et donc si une ame charitable aimerai me filer un coup de main, je saurais lui en etre reconnaissant....

merci d'avance....

J'utilise le fichier de la cmcic_contrib_3.0c : cmcic_response_rc1.php (que j'ai renommé en cmcic_response.php) :

Code
<?php
/*
   $Id: cmcic_response_rc1.php,v 1.02  15/04/2009 Sébastien STRAZIERI (informatiquedefrance@gmail.com)
   Adaptation du module CM-CIC révision 3.0 PHP4 - avril 2009

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2009 Informatique de France
   http://www.informatiquedefrance.com

   Released under the GNU General Public License
*/

// remplace application top, enleve la contrainte du cookie qui n'existe pas lorsque le serveur de la banque envoi son code retour
// l'id de session est recupere à partir du champ texte-libre renvoyé par CM - CIC

// set the level of error reporting
error_reporting(E_ALL &~E_NOTICE);

//recuparation des données renvoyées par la banque
$request_method = $_SERVER["REQUEST_METHOD"];
$wRequestVars = "_" . $request_method;
$CMCIC_bruteVars = ${$wRequestVars};

// include server parameters
require('includes/configure.php');

// some code to solve compatibility issues
   require(DIR_WS_FUNCTIONS . 'compatibility.php');

if ($request_type == 'NONSSL') {
     define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
} else {
     define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
}
// include the list of project filenames
require(DIR_WS_INCLUDES . 'filenames.php');
// include the list of project database tables
require(DIR_WS_INCLUDES . 'database_tables.php');
// include the database functions
require(DIR_WS_FUNCTIONS . 'database.php');
// make a connection to the database... now
tep_db_connect() or die('Unable to connect to database server!');
// set the application parameters
   $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
   $config_flag_in = array('Oui', 'Non');
   $config_flag_out = array('true', 'false');
   while ($configuration = tep_db_fetch_array($configuration_query)) {
     $configuration['cfgValue'] = str_replace($config_flag_in, $config_flag_out, $configuration['cfgValue']);
     define($configuration['cfgKey'], $configuration['cfgValue']);
   }
// define general functions used application-wide
require(DIR_WS_FUNCTIONS . 'general.php');
require(DIR_WS_FUNCTIONS . 'html_output.php');
// include shopping cart class
require(DIR_WS_CLASSES . 'shopping_cart.php');
// check if sessions are supported, otherwise use the php3 compatible session class
   if (!function_exists('session_start')) {
     define('PHP_SESSION_NAME', 'osCsid');
     define('PHP_SESSION_PATH', $cookie_path);
     define('PHP_SESSION_DOMAIN', $cookie_domain);
     define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);

     include(DIR_WS_CLASSES . 'sessions.php');
   }
// define how the session functions will be used
require(DIR_WS_FUNCTIONS . 'sessions.php');
// set the session name and save path
tep_session_name('osCsid');
tep_session_save_path(SESSION_WRITE_DIRECTORY);
// ********************************************************************************
************************************
// recuperation de l'id de session contenu dans texte-libre
tep_session_id($CMCIC_bruteVars['texte-libre']);
// ********************************************************************************
************************************
// start the session
$session_started = false;
tep_session_start();
$session_started = true;

if ( ($session_started == true) && (PHP_VERSION >= 4.3) && function_exists('ini_get') && (ini_get('register_globals') == false) ) {
     extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS);
   }
// create the shopping cart & fix the cart if necesary
   if (tep_session_is_registered('cart') && is_object($cart)) {
     if (PHP_VERSION < 4) {
       $broken_cart = $cart;
       $cart = new shoppingCart;
       $cart->unserialize($broken_cart);
     }
   } else {
     tep_session_register('cart');
     $cart = new shoppingCart;
   }
// include currencies class and create an instance
   require(DIR_WS_CLASSES . 'currencies.php');
   $currencies = new currencies();

// include the mail classes
   require(DIR_WS_CLASSES . 'mime.php');
   require(DIR_WS_CLASSES . 'email.php');
// set the language
if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
     if (!tep_session_is_registered('language')) {
         tep_session_register('language');
         tep_session_register('languages_id');
     }

     include(DIR_WS_CLASSES . 'language.php');
     $lng = new language();

     if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
         $lng->set_language($HTTP_GET_VARS['language']);
     } else {
         $lng->get_browser_language();
     }

     $language = $lng->language['directory'];
     $languages_id = $lng->language['id'];
}
// include the language translations
   require(DIR_WS_LANGUAGES . $language . '.php');

// currency
   if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {
     if (!tep_session_is_registered('currency')) tep_session_register('currency');

     if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {
       $currency = $HTTP_GET_VARS['currency'];
     } else {
       $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
     }
   }
// ________________________________________________________________________________
________________________________
include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);
// load selected payment module
include(DIR_WS_MODULES . 'payment/cmcic.php');
$payment_modules = new cmcic();

// load the selected shipping module
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);

require(DIR_WS_CLASSES . 'order.php');
$order = new order;

// on archive les données reçues de la banque dans la table cmcic_response
tep_db_perform('cmcic_response', array(
             'ref_number' => $CMCIC_bruteVars['reference'],
             'MAC' => $CMCIC_bruteVars['MAC'],
             'TPE' => $CMCIC_bruteVars['TPE'],
             'date' => $CMCIC_bruteVars['date'],
             'montant' => $CMCIC_bruteVars['montant'],
             'texte_libre' => $CMCIC_bruteVars['texte-libre'],
             'code_retour' => $CMCIC_bruteVars['code-retour'],
             'retourPLUS' => $CMCIC_bruteVars['retourPLUS'])    
             );

require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();

// Begin Main : Retrieve Variables posted by CMCIC Payment Server
$CMCIC_bruteVars = getMethode();

// TPE init variables
$oTpe = new CMCIC_Tpe();
$oHmac = new CMCIC_Hmac($oTpe);

// Message Authentication
$cgi2_fields = sprintf(CMCIC_CGI2_FIELDS, $oTpe->sNumero,
                       $CMCIC_bruteVars["date"],
                       $CMCIC_bruteVars['montant'],
                       $CMCIC_bruteVars['reference'],
                       $CMCIC_bruteVars['texte-libre'],
                       $oTpe->sVersion,
                       $CMCIC_bruteVars['code-retour'],
                       $CMCIC_bruteVars['cvx'],
                       $CMCIC_bruteVars['vld'],
                       $CMCIC_bruteVars['brand'],
                       $CMCIC_bruteVars['status3ds'],
                       $CMCIC_bruteVars['numauto'],
                       $CMCIC_bruteVars['motifrefus'],
                       $CMCIC_bruteVars['originecb'],
                       $CMCIC_bruteVars['bincb'],
                       $CMCIC_bruteVars['hpancb'],
                       $CMCIC_bruteVars['ipclient'],
                       $CMCIC_bruteVars['originetr'],
                       $CMCIC_bruteVars['veres'],
                       $CMCIC_bruteVars['pares']
                     );


Edition longueur inutile


Code
          // load the after_process function from the payment modules
             $payment_modules->after_process();
             $cart->reset(true);
             // unregister session variables used during checkout
             tep_session_unregister('sendto');
             tep_session_unregister('billto');
             tep_session_unregister('shipping');
             tep_session_unregister('payment');
             tep_session_unregister('comments');
// ________________________________________________________________________________
________________________________
             // on enregistre la valeur de la derniere commande
             $order_id = $insert_id;
             tep_session_register('order_id');
             tep_db_perform('cmcic_reference', array('order_id' => $order_id), 'update', "ref_number='". $CMCIC_bruteVars['reference']."'");
             break;
     }
     $receipt = CMCIC_CGI2_MACOK;
}
else
{
     // your code if the HMAC doesn't match
     $receipt = CMCIC_CGI2_MACNOTOK.$cgi2_fields;
}
//-----------------------------------------------------------------------------
// Send receipt to CMCIC server
//-----------------------------------------------------------------------------
printf (CMCIC_CGI2_RECEIPT, $receipt);
tep_session_close();
?>


Ce message a été modifié par chti_poupon - 21 Mar 2012, 20:24.
Raison de l'édition : Pas de lien publicitaire + trop long
Go to the top of the page
 
Havock
posté 21 Mar 2012, 16:58
Message #2


Ceinture verte OSC
Icône de groupe

Groupe : Membres
Messages : 755
Inscrit : 4-February 04
Membre no 1926



Tu devrais avoir une réponse là : http://www.oscommerce-fr.info/forum/index....st&p=350388


--------------------
L'indispensable est en cours de traitement,
L'urgent sera traité demain,
Le normal sera traité plus tard,
Le reste on vera ...
En conclusion : les journées sont trop courtes.
Utilisateur de MS2.2 Max 1.5 - OSC-Affiliate 1.09 - Admin With Access Levels 2.1 - Meta Tag Controller/ Generator - Credit/Gift Voucher/Coupons 5.05 - Download Controller v5.3 - X-Sell MS2 - WYSIWYG HTML Editor for Admin 1.7 - Dynamic Mo Pics - Loginbox Best - Order logging before payment processing - User Tracking - Faster Page Loads, Less DB queries - Plus plein de modifs perso :-)
Go to the top of the page
 

Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



RSS Version bas débit Nous sommes le : 1st November 2014 - 14:12
Ce site est déclaré auprès de la commision Nationale
de l'Informatique et des Libertés (déclaration n°: 1043896)