- Cambios

- Web on-line

git-svn-id: https://192.168.0.254/svn/Proyectos.FundacionLQDVI_Web/trunk@49 77ab8c26-3d69-2c4d-86f2-786f4ba54905
This commit is contained in:
David Arranz 2011-10-14 10:16:52 +00:00
parent 5e9078b8c3
commit 2d187140fb
130 changed files with 2211 additions and 1421 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,10 @@
UPDATE wp_options SET option_value = replace(option_value, 'http://www.loquedeverdadimporta.org/web', 'http://localhost/lqdvi') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.loquedeverdadimporta.org/web','http://localhost/lqdvi');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.loquedeverdadimporta.org/web', 'http://localhost/lqdvi');
UPDATE wp_contact_form_7 SET additional_settings = replace(additional_settings , 'http://www.loquedeverdadimporta.org/web', 'http://localhost/lqdvi');
UPDATE wp_facethumb SET url = replace(url, 'http://www.loquedeverdadimporta.org/web', 'http://localhost/lqdvi');
UPDATE wp_options SET option_value = replace(option_value, 'http://www.loquedeverdadimporta.org/web', 'http://localhost/lqdvi');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.loquedeverdadimporta.org/web', 'http://localhost/lqdvi');
UPDATE wp_rg_lead SET source_url = replace(source_url, 'http://www.loquedeverdadimporta.org/web', 'http://localhost/lqdvi');
UPDATE wp_options SET option_value = replace(option_value, 'http://www.loquedeverdadimporta.org/web', 'http://www.loquedeverdadimporta.org');
UPDATE wp_posts SET guid = replace(guid, 'http://www.loquedeverdadimporta.org/web','http://www.loquedeverdadimporta.org');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.loquedeverdadimporta.org/web', 'http://www.loquedeverdadimporta.org');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.loquedeverdadimporta.org/web', 'http://www.loquedeverdadimporta.org');
UPDATE wp_contact_form_7 SET additional_settings = replace(additional_settings , 'http://www.loquedeverdadimporta.org/web', 'http://www.loquedeverdadimporta.org');
UPDATE wp_facethumb SET url = replace(url, 'http://www.loquedeverdadimporta.org/web', 'http://www.loquedeverdadimporta.org');
UPDATE wp_options SET option_value = replace(option_value, 'http://www.loquedeverdadimporta.org/web', 'http://www.loquedeverdadimporta.org');
UPDATE wp_rg_lead SET source_url = replace(source_url, 'http://www.loquedeverdadimporta.org/web', 'http://www.loquedeverdadimporta.org');
UPDATE wp_bannerize_b SET filename = replace(filename, 'http://www.loquedeverdadimporta.org/web', 'http://www.loquedeverdadimporta.org');

View File

@ -28,10 +28,10 @@ $page_postmetas =
/*
Begin Page custom fields
*/
array("section" => "Page Style", "id" => "page_style", "type" => "select", "title" => "Select Page style (Right Sidebar style will include wiget on the right side)", "items" => array("Right Sidebar", "Left Sidebar", "Full Width")),
array("section" => "Page Style", "id" => "page_style", "type" => "select", "title" => "Select Page style (Right Sidebar style will include wiget on the right side)", "items" => array("Full Width", "Right Sidebar", "Left Sidebar")),
array("section" => "Page Style", "id" => "page_desc", "type" => "text", "title" => "Enter page description."),
array("section" => "Caption Style", "id" => "caption_style", "type" => "select", "title" => "Select Caption style", "items" => array("Title Only", "Description Only", "Title & Description")),
array("section" => "Caption Style", "id" => "caption_style", "type" => "select", "title" => "Select Caption style", "items" => array("Description Only", "Title Only", "Title & Description")),
array("section" => "Select Sidebar", "id" => "page_sidebar", "type" => "select", "title" => "Select this page's sidebar to display", "items" => $theme_sidebar),
/*

View File

@ -1,69 +1,9 @@
<?php
add_filter('gform_confirmation', 'build_confirmation', 10, 4);
add_filter('gform_confirmation', 'build_confirmation_1', 10, 4);
function build_confirmation($confirmation, $form, $entry, $ajax) {
if ($form['id'] == 1) { // Socio
function build_confirmation_1($confirmation, $form, $entry, $ajax) {
$confirmation = llamar_pasarela_socio($entry);
}
if ($form['id'] == 2) { // Amigo
$confirmation = llamar_pasarela_amigo($entry);
}
return $confirmation;
}
function llamar_pasarela_amigo($entry) {
/*$file = fopen("tpv.log", "w");
fwrite ($file, "AMIGO\n");
foreach($entry as $k => $v) {
fwrite($file, "$k ==> $v\n");
}
fclose($file); */
$datos = array();
$datos['titular'] = $entry[1] . ' ' . $entry[2];
$datos['url_tpvv'] = 'https://sis-t.sermepa.es:25443/sis/realizarPago';
$datos['clave'] = 'qwertyasdf0123456789';
$datos['nombre_comercio'] = 'Fundacion Lo que de verdad importa';
$datos['url_comercio'] = 'http://www.loquedeverdadimporta.org';
$datos['code'] = '322204298';
$datos['terminal'] = '1';
$datos['num_orden'] = date('ymdHis');
$datos['moneda'] = '978'; //euros
$datos['transaction_type'] = '0';
$datos['producto'] = 'Aportacion LQDVI';
$datos['URLOK'] = $datos['url_comercio'].'/web/quieres-ser-amigo/gracias-por-ser-nuestro-amigo/';
$datos['URLKO'] = $datos['url_comercio'].'/web/se-ha-producido-un-error/';
// Convertir la cantidad
$datos['cantidad'] = ereg_replace("[^0-9]", "", $entry[19]);
// Calcular firma
$datos['mensaje'] = $datos['cantidad'].$datos['num_orden'].$datos['code'].$datos['moneda'].$datos['transaction_type'].$datos['url_comercio'].$datos['clave'];
$datos['firma'] = strtoupper(sha1($datos['mensaje']));
$confirmation = "<div id='gforms_confirmation_message' style='text-align:center; padding: 10px;'>";
$confirmation .= "Conectando con pasarela de pago...";
$confirmation .= "<form method='post' action='".$datos['url_tpvv']."' name='form_to_tpv' id='form_to_tpv'>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_Amount' value='".$datos['cantidad']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_Currency' value='".$datos['moneda']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_Order' value='".$datos['num_orden']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_MerchantCode' value='".$datos['code']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_Terminal' value='".$datos['terminal']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_TransactionType' value='".$datos['transaction_type']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_MerchantURL' value='".$datos['url_comercio']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_MerchantSignature' value='".$datos['firma']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_ProductDescription' value='".$datos['producto']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_UrlOK' value='".$datos['URLOK']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_UrlKO' value='".$datos['URLKO']."'/>";
$confirmation .= "</form>";
$confirmation .= "</div>";
$confirmation .= "<script type='text/javascript'>";
$confirmation .= "document.getElementById('form_to_tpv').submit();";
$confirmation .= "</script>";
return $confirmation;
}
@ -75,7 +15,10 @@ function llamar_pasarela_socio($entry) {
fwrite($file, "$k ==> $v\n");
}
fwrite ($file, "DATOS\n");*/
$nombre_cuotas = array('12' => 'mensual',
'4' => 'trimestral',
'2' => 'semestral',
'1' => 'anual');
$datos = array();
$datos['titular'] = $entry[1] . ' ' . $entry[2];
@ -95,27 +38,38 @@ function llamar_pasarela_socio($entry) {
$datos['frecuencia_ano'] = $cuota[0];
if ($datos['frecuencia_ano'] != 1) { // Es una cuota
$datos['frecuencia_dias'] = round(365/$datos['frecuencia_ano']);
$datos['frecuencia_fecha_limite'] = date("Y-m-d", strtotime('+10 Year')); // Mantener las cuotas 10 años a partir de hoy
//$datos['frecuencia_dias'] = round(365/$datos['frecuencia_ano']);
//$datos['frecuencia_fecha_limite'] = date("Y-m-d", strtotime('+10 Year')); // Mantener las cuotas 10 años a partir de hoy
$datos['cantidad'] = $cuota[1] * 100;
$datos['suma_total'] = $datos['cantidad'] * ($datos['frecuencia_ano']*10); // Calcular el total de cuotas en 10 años
/* Método de pago:
* T: significa pago con tarjeta.
* D: significa pago por domiciliación bancaria.
* R: significa pago por transferencia.
*/
$datos['metodo_pago'] = 'D'; // <- Domiciliación
$datos['producto'] = 'Aportacion LQDVI';
$datos['transaction_type'] = '5'; // <- Transacción recurrente
//$datos['suma_total'] = $datos['cantidad'] * ($datos['frecuencia_ano']*10); // Calcular el total de cuotas en 10 años
$datos['producto'] = 'Cuota ' . $nombre_cuotas[$datos['frecuencia_ano']] . ' LQDVI';
$datos['transaction_type'] = '0'; // <- Autoriación ('5' <- Transacción recurrente)
} else { // Es una aportación puntual
$datos['cantidad'] = ereg_replace("[^0-9]", "", $entry[19]);
$datos['producto'] = 'Cuota LQDVI';
$datos['metodo_pago'] = 'T'; // <- Tarjeta
$datos['producto'] = 'Aportacion LQDVI';
$datos['transaction_type'] = '0'; // <- Autorización
}
// Calcular firma
if ($datos['frecuencia_ano'] != 1) { // Es una cuota
$datos['mensaje'] = $datos['cantidad'].$datos['num_orden'].$datos['code'].$datos['moneda'].$datos['suma_total'].$datos['transaction_type'].$datos['url_comercio'].$datos['clave'];
} else { // Es una aportación puntual
$datos['mensaje'] = $datos['cantidad'].$datos['num_orden'].$datos['code'].$datos['moneda'].$datos['transaction_type'].$datos['url_comercio'].$datos['clave'];
}
/* if ($datos['frecuencia_ano'] != 1) { // Es una cuota
* $datos['mensaje'] = $datos['cantidad'].$datos['num_orden'].$datos['code'].$datos['moneda'].$datos['suma_total'].$datos['transaction_type'].$datos['url_comercio'].$datos['clave'];
*} else { // Es una aportación puntual
* $datos['mensaje'] = $datos['cantidad'].$datos['num_orden'].$datos['code'].$datos['moneda'].$datos['transaction_type'].$datos['url_comercio'].$datos['clave'];
*}
*/
// Calcular firma
$datos['mensaje'] = $datos['cantidad'].$datos['num_orden'].$datos['code'].$datos['moneda'].$datos['transaction_type'].$datos['url_comercio'].$datos['clave'];
$datos['firma'] = strtoupper(sha1($datos['mensaje']));
/*foreach($datos as $k => $v)
@ -124,6 +78,7 @@ function llamar_pasarela_socio($entry) {
$confirmation = "<div id='gforms_confirmation_message' style='text-align:center; padding: 10px;'>";
$confirmation .= "Conectando con pasarela de pago...";
$confirmation .= "<form method='post' action='".$datos['url_tpvv']."' name='form_to_tpv' id='form_to_tpv'>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_Titular' value='".$datos['titular']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_Amount' value='".$datos['cantidad']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_Currency' value='".$datos['moneda']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_Order' value='".$datos['num_orden']."'/>";
@ -136,12 +91,14 @@ function llamar_pasarela_socio($entry) {
$confirmation .= "<input type='hidden' name='Ds_Merchant_UrlOK' value='".$datos['URLOK']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_UrlKO' value='".$datos['URLKO']."'/>";
if ($datos['frecuencia_ano'] != 1) {
$confirmation .= "<input type='hidden' name='Ds_Merchant_DateFrecuency' value='".$datos['frecuencia_dias']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_ChargeExpiryDate' value='".$datos['frecuencia_fecha_limite']."'/>";
$confirmation .= "<input type='hidden' name='Ds_Merchant_SumTotal' value='".$datos['suma_total']."'/>";
}
/* if ($datos['frecuencia_ano'] != 1) { // Es una cuota
* $confirmation .= "<input type='hidden' name='Ds_Merchant_DateFrecuency' value='".$datos['frecuencia_dias']."'/>";
* $confirmation .= "<input type='hidden' name='Ds_Merchant_ChargeExpiryDate' value='".$datos['frecuencia_fecha_limite']."'/>";
* $confirmation .= "<input type='hidden' name='Ds_Merchant_SumTotal' value='".$datos['suma_total']."'/>";
*}
*/
$confirmation .= "<input type='hidden' name='Ds_Merchant_PayMethods' value='".$datos['metodo_pago']."'/>";
$confirmation .= "</form>";
$confirmation .= "</div>";
$confirmation .= "<script type='text/javascript'>";

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Some files were not shown because too many files have changed in this diff Show More