PHP code example of redsys / fake

1. Go to this page and download the library: Download redsys/fake library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

redsys / fake example snippets


return array(
    // Signature Key
    'Key' => 'sq7HjrUOBfKmC576ILgskD5srU870gJ7',

    // Basic auth to attach to Ds_Merchant_MerchantURL response if your environment is protected
    'basic_auth' => array(
        'user' => '',
        'password' => ''
    )
);

$TPV = new Redsys\Tpv\Tpv(array(
    'environments' => array(
        'local' => 'http://redsys-fake.mydomain.com'
    ),

    'Environment' => 'local',
    'Key' => 'sq7HjrUOBfKmC576ILgskD5srU870gJ7', // Debe coincidir con el valor de Key del entorno de pruebas

    ....
));