Last active
November 29, 2022 21:52
-
-
Save joseconti/93518e229bd1a004533d5cf34df0ba2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* SOAP Test for Redsys. | |
* | |
* @package WooCommerce Redsys Gateway (https://woocommerce.com/es-es/products/redsys-gateway/) | |
* @copyright José Conti | |
*/ | |
if ( ! class_exists( 'SoapClient' ) ) { | |
echo 'ATENCIÓN, SOAP NO ACTIVO'; | |
exit(); | |
} | |
try { | |
$soapClient = new SoapClient( 'https://sis.redsys.es/sis/services/SerClsWSEntradaV2?wsdl' ); // Real | |
} | |
catch( Exception $e ) { | |
$exceptionMessage = $e->getMessage(); | |
} | |
if ( ! $exceptionMessage ) { | |
echo '<p>Conexion correcta con REAL</p>'; | |
} else { | |
echo '<p>Error al intentar conectar con REAL</p>'; | |
} | |
try { | |
$soapClient = new SoapClient( 'https://sis-t.redsys.es:25443/sis/services/SerClsWSEntradaV2?wsdl' ); // Pruebas | |
} | |
catch( Exception $e ) { | |
$exceptionMessage = $e->getMessage(); | |
} | |
if ( ! $exceptionMessage ) { | |
echo '<p>Conexion correcta con PRUEBAS</p>'; | |
} else { | |
echo '<p>Error al intentar conectar con PRUEBAS</p>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solo debes subir este archivo a la raíz de tu instalación.
Accedes a él, por ejemplo tusitio.com/test-soap.php y verás si tu sitio va a tener problemas con la API SOAP de Redsys.
Tener problemas con la conexión, implica diferentes problemas, como imposibilidad de devoluciones, pago con 1clic directo, suscripciones, InSite, etc.