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 | |
function get_tls_version($sslversion = null) | |
{ | |
$c = curl_init(); | |
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check"); | |
curl_setopt($c, CURLOPT_RETURNTRANSFER, true); | |
if ($sslversion !== null) { | |
curl_setopt($c, CURLOPT_SSLVERSION, $sslversion); | |
} |
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
RESULT_CODES = (<<-EOT).split(/\r?\n/).reject {|s| s.match(/^( *#.*)?$/)}.map { |s| s.sub(/^ +/,'').split(/ +/,2) }.to_h | |
# Copied from http://dwalins.com/2014/codigo-de-respuesta-de-sermepa-redsys/ | |
0101 Tarjeta Caducada | |
0102 Tarjeta en excepción transitoria o bajo sospecha de fraude | |
0104 Operación no permitida para esa tarjeta o terminal | |
0106 Intentos de PIN excedidos | |
0116 Disponible Insuficiente | |
0118 Tarjeta no Registrada | |
0125 Tarjeta no efectiva | |
0129 Código de seguridad (CVV2/CVC2) incorrecto |