• Resolved kemdefer

    (@kemdefer)


    Buenas llevo dias pelenadome pero no hay manera,
    Servidor con ip compartida, sin cloudflare, sin plugins de seguridad ..
    redireccion en htacces
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # Enviar trafico HTTP a HTTPS
    RewriteEngine On
    # Si la cadena de consulta no contiene wc-api=WC_MyRedsys
    RewriteCond %{QUERY_STRING} !wc-api=WC_MyRedsys [NC]
    # Y la conexión no es HTTPS
    RewriteCond %{HTTPS} off
    # Redirigimos a la versión con HTTPS
    RewriteRule ^(.*)$ https://www.priorterrae.es/$1 [R=301,L,NE]
    </IfModule>

    pero sigue dando el error y no se actualizan los pedidos

    Tipo notificaciónHTTPModo de comunicaciónSíncronaResultado operación0000Cod. respuesta servidorError (Server returned HTTP response code: 403 for URL: http://www.priorterrae.es/?wc-api=WC_MyRedsys)Destino notificaciónhttp://www.priorterrae.es/?wc-api=WC_MyRedsysDatos notificaciónDs_SignatureVersion=HMAC_SHA256_V1&Ds_MerchantParameters=eyJEc19EYXRlIjoiMTclMkYxMSUyRjIwMjAiLCJEc19Ib3VyIjoiMTglM0EyNCIsIkRzX1NlY3VyZVBheW1lbnQiOiIxIiwiRHNfQ2FyZF9Db3VudHJ5IjoiNzI0IiwiRHNfQW1vdW50IjoiMzYxNyIsIkRzX0N1cnJlbmN5IjoiOTc4IiwiRHNfT3JkZXIiOiIwMDAwMDMwMjIzNTMiLCJEc19NZXJjaGFudENvZGUiOiIzNDgzNTIwNyIsIkRzX1Rlcm1pbmFsIjoiMDAxIiwiRHNfUmVzcG9uc2UiOiIwMDAwIiwiRHNfTWVyY2hhbnREYXRhIjoiMWFmM2M0ZTc3ZjhiNzllMjc1ZGM1Zjc1N2NmYjk3ZDRjMWZiMGY3MiIsIkRzX1RyYW5zYWN0aW9uVHlwZSI6IjAiLCJEc19Db25zdW1lckxhbmd1YWdlIjoiMSIsIkRzX0F1dGhvcmlzYXRpb25Db2RlIjoiMjI0MDY5IiwiRHNfQ2FyZF9CcmFuZCI6IjEiLCJEc19Qcm9jZXNzZWRQYXlNZXRob2QiOiIxIn0=&Ds_Signature=O7XHk475ZabHXoQkUxmBO4FBvB6-5Uu7K09htESeRjM=

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author jesusangel.delpozo

    (@jesusangeldelpozo)

    Hola.

    Las condiciones de la redirección están bien, y está funcionando como debe.

    Con la variable wc-api responde directamente por HTTP:

    curl -I http://www.priorterrae.es/?wc-api=WC_MyRedsys
    HTTP/1.1 200 OK
    Content-Type: text/html; charset=UTF-8
    Date: Tue, 17 Nov 2020 19:19:30 GMT

    Con otra URL el servidor envía la cabecera Location para redirigir al navegador del usuario a la versión con HTTPS:

    curl -I http://www.priorterrae.es/?blah
    HTTP/1.1 301 Moved Permanently
    Date: Tue, 17 Nov 2020 19:21:34 GMT
    Location: https://www.priorterrae.es/?blah

    El código de la respuesta que le está llegando a Redsys es 403 que significa que no se permite acceder al contenido (acceso prohibido).

    ¿Puede ser que la configuración del servidor en ese momento fuera diferente?

    También puede ser un problema de la configuración de la pasarela de Redsys. ¿Qué tipo de notificación has configurado en el TPV virtual? Tiene que ser notificación online y que no sea del tipo SOAP.

    • This reply was modified 4 years, 7 months ago by jesusangel.delpozo. Reason: Añadir información
    Thread Starter kemdefer

    (@kemdefer)

    Primero que todo gracias por contestar!!!
    la configuración del server sigue siendo la misma y el htacces sigue igual pero ahora al ir yo a la dirección http://www.priorterrae.es/?wc-api=WC_MyRedsys me redirije a https,
    la configuración del tpv virtual es notificación
    online: http
    sincronización: sincrona
    enviar parametros en urls : NO

    tengo simple ssl instalado

    General
    Plugin version: 3.3.5
    Invalid SSL certificate
    SSL is enabled

    Options
    * Mixed content fixer
    * htaccess redirect
    * Stop editing the .htaccess file

    Server information
    Server: litespeed
    SSL Type: SERVER-HTTPS-ON

    Detecting configuration

    SSL Configuration
    testing htaccess rules…
    test page url, enter in browser to check manually: https://www.priorterrae.es/wp-content/plugins/really-simple-ssl/testssl/serverhttpson/ssl-test-page.html
    htaccess rules tested successfully.
    checking if .htaccess can or should be edited…
    Edit of .htaccess blocked by setting or define ‘do not edit htaccess’ in Really Simple SSL.
    converting siteurl and homeurl to https
    Mixed content fixer successfully detected
    .htaccess does not contain default Really Simple SSL redirect

    Constants
    No constants defined

    Plugin Author jesusangel.delpozo

    (@jesusangeldelpozo)

    Hola.

    El motivo por el que el navegador te redirige de HTTP a HTTPS es porque en la versión bajo SSL tienes establecida la cabecera Strict-Transport-Security. Eso no es ningún problema, lo que hace dicha cabecera es activar un mecanismo de seguridad llamado HSTS que hace que los navegadores accedan al sitio siempre bajo HTTPS aunque el usuario intente acceder a la versión sin cifrado. Sin embargo, es un mecanismo que no afecta a llamadas entre servidores (como es el caso de la notificación de Redsys).

    El registro del TPV indica errores del tipo 403 que significan que tu servidor web no autoriza el acceso a la URL. Ciertamente, yo tampoco he obtenido ese error, pero creo que es la causa del problema. Si el problema estuviera en que la notificación se hace a través de HTTPS lo que verías es un mensaje de error indicando que no se confía en el certificado, o que hay algún problema al validarlo.

    Echa un vistazo al registro de las notificaciones que aparecen en el TPV y al log de tu servidor web que podrás encontrar en el panel de control del servidor que aloja tu sitio web.

    Saludos cordiales.

    Thread Starter kemdefer

    (@kemdefer)

    Jesus Muchas gracias por tus indicaciones,
    tema resuelto era un tema del mod_security de apache
    Solucionado!!

    Plugin Author jesusangel.delpozo

    (@jesusangeldelpozo)

    Eso me cuadra más. Me alegro de que lo hayas solucionado.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problemas con la respuesta de redsys’ is closed to new replies.