• Francia
página de estado
demo
asistencia
FAQContacte el soporte tecnico
Buscar
Categoria
Tags
docs.
Francia
España
Europa (Inglés)
India
Página principal
Casos de uso
Crear un pago
Crear un pago en vencimientos
Crear un pago multitarjeta
Crear un pago por token
Crear un enlace de pago
Crear una suscripción
Gestione sus suscripciones
Gestione sus transacciones
Analizar los diarios
Docs API
Formulario incrustado
API REST
Formulario en redirección
Pago móvil
Intercambio de ficheros
Ejemplo de código
Medios de pago
Plugins
Guías
Back office Experto
Guías funcionales

Ejemplo de implementación en PHP

Ejemplo de cálculo de firma con el algoritmo HMAC-SHA-256:

function getSignature ($params,$key)
{
    /**
     *Function that computes the signature.
     * $params : table containing the fields to send in the payment form.
     * $key : TEST or PRODUCTION key
     */
    //Initialization of the variable that will contain the string to encrypt
    $signature_content = "";
    //sorting fields alphabetically
    ksort($params);
    foreach($params as $name=>$value){
        //Recovery of vads_ fields 
        if (substr($name,0,5)=='vads_'){
            //Concatenation with "+"
            $signature_content .= $value."+";
         }
    }
    //Adding the key at the end
    $signature_content .= $key;
    //Encoding base64 encoded chain with SHA-256 algorithm
    $signature = base64_encode(hash_hmac('sha256',$signature_content, $key, true));
    return $signature;
 }

Ejemplo de cálculo de firma con el algoritmo SHA-1:

function getSignature($params, $key)
{
    /**
     * Function that computes the signature.
     * $params : table containing the fields to send in the payment form.
     * $key : TEST or  PRODUCTION key
     */
    //Initialization of the variable that will contain the string to encrypt
    $signature_content = "" ;
    // Sorting fields alphabetically
    ksort($params);
        foreach ($params as $name =>$value)
    { 
    // Recovery of vads_ fields 
        if (substr($name,0,5)=='vads_') { 
            // Concatenation with "+"
            $signature_content .= $value."+";
        }
    }
    // Adding the key at the end
    $signature_content .= $key;
    // Applying SHA-1 algorithm
    $signature = sha1($signature_content);
    return $signature ;
}
Jobs
Legal
GDPR
25.18-1.11