1. Go to this page and download the library: Download innovaweb/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/ */
innovaweb / transbank example snippets
private $webpay_plus;
public function __construct()
{
if (env('APP_ENV') == 'production') {
$this->webpay_plus = new WebpayPlus(
env('TBK_CC'),
env('TBK_API_KEY'),
WebpayPlus::PRODUCTION
);
} else {
$this->webpay_plus = new WebpayPlus();
}
}