Skip to content

Instantly share code, notes, and snippets.

class DummyObjectModel extends ObjectModel
{
public $force_id = true;
public static $definition = array(
'table' => 'dummy',
'primary' => 'id',
'multilang' => false,
'fields' => array(
'id' => array(
'type' => self::TYPE_INT,
<?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);
}
Sequra.onLoad(function(){
//CUSTOMIZE
var item_selector = ".owl-wrapper .owl-item";
var price_selector_in_item = ".price-box";
var dest_selector_in_item = ".actions";
var msg_template = "<i class='sequra_installment'>Desde %s /mes</i>"
//CUSTOMIZE
document.querySelectorAll(item_selector).forEach(function (item, index) {
var sequraConfigParams = {
merchant: "agrieuro", // Your merchant reference given by SeQura.
assetKey: "G1GbZfecNj", // Your asset key given by SeQura.
products: ["i1", "pp3"], // List of SeQura products that you want to include components.
scriptUri: "https://sandbox.sequracdn.com/assets/sequra-checkout.min.js", // SeQura Javascript library uri for production or sandbox.
decimalSeparator: ',', // Decimal separator used in currencies formatting. Optional, default `,`.
thousandSeparator: '.', // Thousand separator used in currencies formatting. Optional, default `.`.
};
(function(i, s, o, g, r, a, m) {i['SequraConfiguration'] = g;i['SequraOnLoad'] = [];i[r] = {};i[r][a] = function(callback) {i['SequraOnLoad'].push(callback);};(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);a.async = 1;a.src = g.scriptUri;m.parentNode.insertBefore(a, m);})(window, document, 'script', sequraConfigParams, 'Sequra', 'onLoad');

Keybase proof

I hereby claim:

  • I am m1k3lm on github.
  • I am m1k3lm (https://keybase.io/m1k3lm) on keybase.
  • I have a public key ASD8d1Cs7gHbH716YuUZUHNgrYmzm46i-VVk_59tzuGIFQo

To claim this, I am signing this object:

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