bonsoir à tous bon voilla je suis un peu perdu j'ai essayer plusieur fois de changer le lien de retour mais j'ai toujour une erreur 404 pourtant cette page existe bien de plus il me vide ni le panier et pas d'enregisttrement voilla comme je procede
donc le client arrive sur le module de paiement cofidis1
<?php
/*
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
COFIDIS Module Copyright (c) 2006 ZhenIT
[email protected]
Released under the GNU General Public License
*/
class cofidis_ZhenIT {
var $code, $title, $description, $enabled,$debug;
// class constructor
function cofidis_ZhenIT() {
global $order, $request_type;
$this->code = 'cofidis_ZhenIT';
$this->title = MODULE_PAYMENT_COFIDIS_TEXT_TITLE;
$this->description = MODULE_PAYMENT_COFIDIS_TEXT_DESCRIPTION;
$this->enabled = ((MODULE_PAYMENT_COFIDIS_STATUS == 'Sí') ? true : false);
$this->sort_order = MODULE_PAYMENT_COFIDIS_SORT_ORDER;
$this->debug = false;
if ((int)MODULE_PAYMENT_COFIDIS_ORDER_STATUS_ID > 0) {
$this->order_status = MODULE_PAYMENT_COFIDIS_ORDER_STATUS_ID;
}
$this->form_action_url = MODULE_PAYMENT_COFIDIS_FORM_URL;
if (is_object($order)) $this->update_status();
}
function trace($log){
if(!$this->debug)
return;
$fp = fopen (DIR_FS_CATALOG . '/includes/modules/payment/cofidis.log', "a+");
fwrite($fp,date("Y-m-d H:i:s")." - ".$log."\n");
fclose($fp);
}
// class methods
function update_status() {
global $order;
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COFIDIS_ZONE > 0) ) {
$check_flag = false;
$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COFIDIS_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
while ($check = tep_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
if ($order->info['total'] < MODULE_PAYMENT_COFIDIS_IMPORTE_MIN) {
$this->enabled = false;
}
}
function javascript_validation() {
return false;
}
function selection() {
return array('id' => $this->code,
'module' => $this->title);
}
function pre_confirmation_check() {
return false;
}
function confirmation() {
return false;
}
function process_button()
{
global $order, $customer_id,$currency,$language, $currencies;
$sql = "select * from " . TABLE_CUSTOMERS . " c where c.customers_id = '" . (int)$customer_id . "'";
$query = tep_db_query($sql);
$customer = tep_db_fetch_array($query);
//Total setup without .
$importe=$order->info['total'];
$importe=round($importe*$order->info['currency_value'],2);
$importe=number_format($importe, 2, '.', '');
//$importe=preg_replace('/\./', ',', $importe);
$data=array("importe"=>$importe,
"customers_id" => (int)$customer_id
);
tep_db_perform("cofidis_ZhenIT", $data);
$referencia = tep_db_insert_id();
$apellidos = split(" ",$order->customer['lastname']);
$hayNif = tep_db_num_rows(tep_db_query('describe address_book entry_nif'));
$nif_contrib = '';
if ($hayNif >0){
if(!isset($order->customer['nif'])){
$nif_query = tep_db_query("select ab.entry_nif from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id");
$nif = tep_db_fetch_array($nif_query);
$order->customer['nif'] = $nif['entry_nif'];
}
$nif_contrib = tep_draw_hidden_field('nif', $order->customer['nif']) . tep_draw_hidden_field(' tipo_documento', 'nif');
}
list($year,$month, $day) = sscanf($customer['customers_dob'], "%04d-%02d-%02d");
$day = sprintf("%02d", $day);
$month = sprintf("%02d", $month);
$process_button_string='';
$process_button_string =
/*Obligatorios*/
tep_draw_hidden_field('partner', MODULE_PAYMENT_COFIDIS_PARTNER) .
tep_draw_hidden_field('producto', MODULE_PAYMENT_COFIDIS_PRODUCTO) .
tep_draw_hidden_field('referencia', $referencia ).
tep_draw_hidden_field('importe',$importe ) .
tep_draw_hidden_field('nombre', $order->customer['firstname']) .
tep_draw_hidden_field('apellidos', $order->customer['lastname']) .
tep_draw_hidden_field('apellido1', $apellidos[0]) .
tep_draw_hidden_field('apellido2', $apellidos[1]) .
tep_draw_hidden_field('url_acept', tep_href_link(FILENAME_CHECKOUT_PROCESS, 'referencia='.$referencia, 'SSL', true, true),false) .
tep_draw_hidden_field('url_rechaz', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, true),false) .
tep_draw_hidden_field('url_confirm', tep_href_link('cofidis_ZhenIT_return.php', '', 'SSL', true, true),false) .
tep_draw_hidden_field('url_error', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, true),false) .
/*opcionales*/
tep_draw_hidden_field('sexo', $customer['customers_gender']=="m"?"V":"M") .
tep_draw_hidden_field('email', $order->customer['email_address']) .
tep_draw_hidden_field('telefono', $order->customer['telephone']) .
$nif_contrib.
tep_draw_hidden_field('via', $order->customer['street_address']) .
tep_draw_hidden_field('cod_postal', $order->customer['entry_postcode']) .
tep_draw_hidden_field('poblacion', $order->customer['entry_city']) .
tep_draw_hidden_field('diaNac', "".$day) .
tep_draw_hidden_field('mesNac', "".$month) .
tep_draw_hidden_field('anyNac', "".$year) ;
return $process_button_string;
}
function before_process()
{
$referencia = $_REQUEST['referencia'];
$sql = "select resultado from cofidis_ZhenIT where referencia='".(int)$referencia."'";
$query = tep_db_query($sql);
$payment = tep_db_fetch_array($query);
if($payment['resultado']=='1')
{
//The order has been succesfully paid
return false;
}
//Payment unsuccesful
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode("Hubo un error procesando el pago, por favor, intente de nuevo o contacte con el comercio"), 'SSL', true, false));
//The order has been succesfully paid
return false;
}
function after_process() {
return false;
}
function output_error() {
return false;
}
function check() {
if (!isset($this->_check)) {
$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_COFIDIS_STATUS'");
$this->_check = tep_db_num_rows($check_query);
}
return $this->_check;
}
function install() {
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('¿Habilitar módulo COFIDIS?', 'MODULE_PAYMENT_COFIDIS_STATUS', 'Sí', '¿Desea aceptar pagos finaciados través de COFIDIS?', '6', '0', 'tep_cfg_select_option(array(\'Sí\', \'No\'), ', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Partner', 'MODULE_PAYMENT_COFIDIS_PARTNER', 'XXX', 'Este es el código de Partner facilitado por la Cofidis', '6', '4', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Producto','MODULE_PAYMENT_COFIDIS_PRODUCTO', '45', 'Código del producto Cofidis contratado (propocionado por Cofidis)', '6', '6', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('importe mínimo','MODULE_PAYMENT_COFIDIS_IMPORTE_MIN', '300.00', 'importe mínimo al que deberá llegar el pedido para ofrecer la opción de ser financiado a través de Cofidis', '6', '7', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Url Cofidis','MODULE_PAYMENT_COFIDIS_FORM_URL', 'https://www.cofidisonline.cofidis.es/FinanciacionEstandar/bienvenido.do', 'Url a la que se enviará la información para la solicitud de financiación, no deberería cambiarse', '6', '8', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Orden de visualización', 'MODULE_PAYMENT_COFIDIS_SORT_ORDER', '0', 'Orden de visualización, el más bajo se visualiza primero.', '6', '11', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Zona de pagos', 'MODULE_PAYMENT_COFIDIS_ZONE', '0', 'Si se selecciona una zona, este módulo solo estará disponible para esa zona.', '6', '12', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Estado de los pedidos', 'MODULE_PAYMENT_COFIDIS_ORDER_STATUS_ID', '0', 'Los pedidos pagados por este método, se pondrán a este estado.', '6', '13', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
$sql="CREATE TABLE cofidis_ZhenIT (".
"referencia INT NOT NULL AUTO_INCREMENT ,".
"orders_id INT DEFAULT '0' ,".
"customers_id INT DEFAULT '0' ,".
"resultado INT DEFAULT '666',".
"numcuotas VARCHAR( 64 ) ,".
"importe INT DEFAULT '0' NOT NULL,".
"PRIMARY KEY ( referencia ));";
$result=tep_db_query($sql);
}
function remove() {
tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
$sql="DROP TABLE IF EXISTS cofidis_ZhenIT";
$result=tep_db_query($sql);
}
function keys() {
return array('MODULE_PAYMENT_COFIDIS_STATUS','MODULE_PAYMENT_COFIDIS_INTERES','MODULE_PAYMENT_COFIDIS_PLAZOMAX','MODULE_PAYMENT_COFIDIS_PARTNER','MODULE_PAYMENT_COFIDIS_PRODUCTO','MODULE_PAYMENT_COFIDIS_IMPORTE_MIN', 'MODULE_PAYMENT_COFIDIS_FORM_URL','MODULE_PAYMENT_COFIDIS_SORT_ORDER', 'MODULE_PAYMENT_COFIDIS_ZONE', 'MODULE_PAYMENT_COFIDIS_ORDER_STATUS_ID');
}
function answer($referencia,
$accept,
$numcuotas){
$this->trace("Desde: ".$_SERVER['REMOTE_ADDR']." pide:".$_SERVER['REQUEST_URI']);
$sql = "select resultado from cofidis_ZhenIT where referencia='".(int)$referencia."'";
$query = tep_db_query($sql);
$payment = tep_db_fetch_array($query);
if($payment['resultado']=='2'){//Estaba pendiente Asnef
if($accept=1)
//Habría que enviar un mail, pero no hay manera de relacionarlo con un pedido
$this->trace("Confirmado un pendiente Asnef");
}
$data=array(
"resultado"=>$accept,
"numcuotas"=>$numcuotas
);
tep_db_perform("cofidis_ZhenIT", $data,'update',"referencia='".(int)$referencia."'");
}
}
?>
puis il est envoyer à mon formulaire createpoaccount
puis createpoaccount le renvoie vers cofidis return
<?
$referencia =='1';
require('includes/application_top.php');
require(DIR_WS_MODULES . 'payment/cofidis_ZhenIT1.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);
$cofidis=new cofidis_ZhenIT1();
$cofidis->trace("Desde: ".$_SERVER['REMOTE_ADDR']." pide:".$_SERVER['REQUEST_URI']);
if($_REQUEST['referencia']=='')
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'error_message=' . urlencode("Hubo un error procesando el pago, por favor, intente de nuevo o contacte con el comercio"), 'SSL', true, false));
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'SSL', true, true));
$cofidis->answer($_REQUEST['referencia'],
$_REQUEST['accept'],
$_REQUEST['numcuotas']
);
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'SSL', true, false));
?>
est la j'ai une erreur 404
Je suis perdu merci de votre aide
bonsoir à tous bon voilla je suis un peu perdu j'ai essayer plusieur fois de changer le lien de retour mais j'ai toujour une erreur 404 pourtant cette page existe bien de plus il me vide ni le panier et pas d'enregisttrement voilla comme je procede
donc le client arrive sur le module de paiement cofidis1[php]<?php
/*
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
COFIDIS Module Copyright (c) 2006 ZhenIT
[email protected] Released under the GNU General Public License
*/
class cofidis_ZhenIT {
var $code, $title, $description, $enabled,$debug;
// class constructor
function cofidis_ZhenIT() {
global $order, $request_type;
$this->code = 'cofidis_ZhenIT';
$this->title = MODULE_PAYMENT_COFIDIS_TEXT_TITLE;
$this->description = MODULE_PAYMENT_COFIDIS_TEXT_DESCRIPTION;
$this->enabled = ((MODULE_PAYMENT_COFIDIS_STATUS == 'Sí') ? true : false);
$this->sort_order = MODULE_PAYMENT_COFIDIS_SORT_ORDER;
$this->debug = false;
if ((int)MODULE_PAYMENT_COFIDIS_ORDER_STATUS_ID > 0) {
$this->order_status = MODULE_PAYMENT_COFIDIS_ORDER_STATUS_ID;
}
$this->form_action_url = MODULE_PAYMENT_COFIDIS_FORM_URL;
if (is_object($order)) $this->update_status();
}
function trace($log){
if(!$this->debug)
return;
$fp = fopen (DIR_FS_CATALOG . '/includes/modules/payment/cofidis.log', "a+");
fwrite($fp,date("Y-m-d H:i:s")." - ".$log."\n");
fclose($fp);
}
// class methods
function update_status() {
global $order;
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COFIDIS_ZONE > 0) ) {
$check_flag = false;
$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COFIDIS_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
while ($check = tep_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
if ($order->info['total'] < MODULE_PAYMENT_COFIDIS_IMPORTE_MIN) {
$this->enabled = false;
}
}
function javascript_validation() {
return false;
}
function selection() {
return array('id' => $this->code,
'module' => $this->title);
}
function pre_confirmation_check() {
return false;
}
function confirmation() {
return false;
}
function process_button()
{
global $order, $customer_id,$currency,$language, $currencies;
$sql = "select * from " . TABLE_CUSTOMERS . " c where c.customers_id = '" . (int)$customer_id . "'";
$query = tep_db_query($sql);
$customer = tep_db_fetch_array($query);
//Total setup without .
$importe=$order->info['total'];
$importe=round($importe*$order->info['currency_value'],2);
$importe=number_format($importe, 2, '.', '');
//$importe=preg_replace('/\./', ',', $importe);
$data=array("importe"=>$importe,
"customers_id" => (int)$customer_id
);
tep_db_perform("cofidis_ZhenIT", $data);
$referencia = tep_db_insert_id();
$apellidos = split(" ",$order->customer['lastname']);
$hayNif = tep_db_num_rows(tep_db_query('describe address_book entry_nif'));
$nif_contrib = '';
if ($hayNif >0){
if(!isset($order->customer['nif'])){
$nif_query = tep_db_query("select ab.entry_nif from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id");
$nif = tep_db_fetch_array($nif_query);
$order->customer['nif'] = $nif['entry_nif'];
}
$nif_contrib = tep_draw_hidden_field('nif', $order->customer['nif']) . tep_draw_hidden_field(' tipo_documento', 'nif');
}
list($year,$month, $day) = sscanf($customer['customers_dob'], "%04d-%02d-%02d");
$day = sprintf("%02d", $day);
$month = sprintf("%02d", $month);
$process_button_string='';
$process_button_string =
/*Obligatorios*/
tep_draw_hidden_field('partner', MODULE_PAYMENT_COFIDIS_PARTNER) .
tep_draw_hidden_field('producto', MODULE_PAYMENT_COFIDIS_PRODUCTO) .
tep_draw_hidden_field('referencia', $referencia ).
tep_draw_hidden_field('importe',$importe ) .
tep_draw_hidden_field('nombre', $order->customer['firstname']) .
tep_draw_hidden_field('apellidos', $order->customer['lastname']) .
tep_draw_hidden_field('apellido1', $apellidos[0]) .
tep_draw_hidden_field('apellido2', $apellidos[1]) .
tep_draw_hidden_field('url_acept', tep_href_link(FILENAME_CHECKOUT_PROCESS, 'referencia='.$referencia, 'SSL', true, true),false) .
tep_draw_hidden_field('url_rechaz', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, true),false) .
tep_draw_hidden_field('url_confirm', tep_href_link('cofidis_ZhenIT_return.php', '', 'SSL', true, true),false) .
tep_draw_hidden_field('url_error', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, true),false) .
/*opcionales*/
tep_draw_hidden_field('sexo', $customer['customers_gender']=="m"?"V":"M") .
tep_draw_hidden_field('email', $order->customer['email_address']) .
tep_draw_hidden_field('telefono', $order->customer['telephone']) .
$nif_contrib.
tep_draw_hidden_field('via', $order->customer['street_address']) .
tep_draw_hidden_field('cod_postal', $order->customer['entry_postcode']) .
tep_draw_hidden_field('poblacion', $order->customer['entry_city']) .
tep_draw_hidden_field('diaNac', "".$day) .
tep_draw_hidden_field('mesNac', "".$month) .
tep_draw_hidden_field('anyNac', "".$year) ;
return $process_button_string;
}
function before_process()
{
$referencia = $_REQUEST['referencia'];
$sql = "select resultado from cofidis_ZhenIT where referencia='".(int)$referencia."'";
$query = tep_db_query($sql);
$payment = tep_db_fetch_array($query);
if($payment['resultado']=='1')
{
//The order has been succesfully paid
return false;
}
//Payment unsuccesful
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode("Hubo un error procesando el pago, por favor, intente de nuevo o contacte con el comercio"), 'SSL', true, false));
//The order has been succesfully paid
return false;
}
function after_process() {
return false;
}
function output_error() {
return false;
}
function check() {
if (!isset($this->_check)) {
$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_COFIDIS_STATUS'");
$this->_check = tep_db_num_rows($check_query);
}
return $this->_check;
}
function install() {
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('¿Habilitar módulo COFIDIS?', 'MODULE_PAYMENT_COFIDIS_STATUS', 'Sí', '¿Desea aceptar pagos finaciados través de COFIDIS?', '6', '0', 'tep_cfg_select_option(array(\'Sí\', \'No\'), ', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Partner', 'MODULE_PAYMENT_COFIDIS_PARTNER', 'XXX', 'Este es el código de Partner facilitado por la Cofidis', '6', '4', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Producto','MODULE_PAYMENT_COFIDIS_PRODUCTO', '45', 'Código del producto Cofidis contratado (propocionado por Cofidis)', '6', '6', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('importe mínimo','MODULE_PAYMENT_COFIDIS_IMPORTE_MIN', '300.00', 'importe mínimo al que deberá llegar el pedido para ofrecer la opción de ser financiado a través de Cofidis', '6', '7', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Url Cofidis','MODULE_PAYMENT_COFIDIS_FORM_URL', 'https://www.cofidisonline.cofidis.es/FinanciacionEstandar/bienvenido.do', 'Url a la que se enviará la información para la solicitud de financiación, no deberería cambiarse', '6', '8', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Orden de visualización', 'MODULE_PAYMENT_COFIDIS_SORT_ORDER', '0', 'Orden de visualización, el más bajo se visualiza primero.', '6', '11', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Zona de pagos', 'MODULE_PAYMENT_COFIDIS_ZONE', '0', 'Si se selecciona una zona, este módulo solo estará disponible para esa zona.', '6', '12', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Estado de los pedidos', 'MODULE_PAYMENT_COFIDIS_ORDER_STATUS_ID', '0', 'Los pedidos pagados por este método, se pondrán a este estado.', '6', '13', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
$sql="CREATE TABLE cofidis_ZhenIT (".
"referencia INT NOT NULL AUTO_INCREMENT ,".
"orders_id INT DEFAULT '0' ,".
"customers_id INT DEFAULT '0' ,".
"resultado INT DEFAULT '666',".
"numcuotas VARCHAR( 64 ) ,".
"importe INT DEFAULT '0' NOT NULL,".
"PRIMARY KEY ( referencia ));";
$result=tep_db_query($sql);
}
function remove() {
tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
$sql="DROP TABLE IF EXISTS cofidis_ZhenIT";
$result=tep_db_query($sql);
}
function keys() {
return array('MODULE_PAYMENT_COFIDIS_STATUS','MODULE_PAYMENT_COFIDIS_INTERES','MODULE_PAYMENT_COFIDIS_PLAZOMAX','MODULE_PAYMENT_COFIDIS_PARTNER','MODULE_PAYMENT_COFIDIS_PRODUCTO','MODULE_PAYMENT_COFIDIS_IMPORTE_MIN', 'MODULE_PAYMENT_COFIDIS_FORM_URL','MODULE_PAYMENT_COFIDIS_SORT_ORDER', 'MODULE_PAYMENT_COFIDIS_ZONE', 'MODULE_PAYMENT_COFIDIS_ORDER_STATUS_ID');
}
function answer($referencia,
$accept,
$numcuotas){
$this->trace("Desde: ".$_SERVER['REMOTE_ADDR']." pide:".$_SERVER['REQUEST_URI']);
$sql = "select resultado from cofidis_ZhenIT where referencia='".(int)$referencia."'";
$query = tep_db_query($sql);
$payment = tep_db_fetch_array($query);
if($payment['resultado']=='2'){//Estaba pendiente Asnef
if($accept=1)
//Habría que enviar un mail, pero no hay manera de relacionarlo con un pedido
$this->trace("Confirmado un pendiente Asnef");
}
$data=array(
"resultado"=>$accept,
"numcuotas"=>$numcuotas
);
tep_db_perform("cofidis_ZhenIT", $data,'update',"referencia='".(int)$referencia."'");
}
}
?>[/php]
puis il est envoyer à mon formulaire createpoaccount
puis createpoaccount le renvoie vers cofidis return
[php]<?
$referencia =='1';
require('includes/application_top.php');
require(DIR_WS_MODULES . 'payment/cofidis_ZhenIT1.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);
$cofidis=new cofidis_ZhenIT1();
$cofidis->trace("Desde: ".$_SERVER['REMOTE_ADDR']." pide:".$_SERVER['REQUEST_URI']);
if($_REQUEST['referencia']=='')
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'error_message=' . urlencode("Hubo un error procesando el pago, por favor, intente de nuevo o contacte con el comercio"), 'SSL', true, false));
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'SSL', true, true));
$cofidis->answer($_REQUEST['referencia'],
$_REQUEST['accept'],
$_REQUEST['numcuotas']
);
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'SSL', true, false));
?>[/php]
est la j'ai une erreur 404
Je suis perdu merci de votre aide