PHP code example of darkghosthunter / transbank

1. Go to this page and download the library: Download darkghosthunter/transbank 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/ */

    

darkghosthunter / transbank example snippets


use DarkGhostHunter\Transbank\Transbank;

$transbank = Transbank::make();

use DarkGhostHunter\Transbank\Transbank;

$transbank = Transbank::getInstance();

$transbank->toProduction([
    'patpass' => ['555876543210','7a7b7d6cce5e...']
]);

use DarkGhostHunter\Transbank\Transbank;

$transaction = Transbank::singleton()
        ->webpay()
        ->create('order#123', 9990, 'https://app.com/compra');