PHP code example of tpay-com / tpay-php

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

    

tpay-com / tpay-php example snippets


Logger::disableLogging();
 

Logger::setLogPath('/my/own/path/Logs/');
 

Logger::setLogger(new CustomLogger());

Util::$customTemplateDirectory = '/my/own/templates/path/';
 

// All Tpay class constructors load Lang class
$tpay = new BankSelectionExample();

// After this line all static messages (input labels, buttons titles etc.) will be displayed in Polish
(new Util())->setLanguage('pl');

// If you want to access translations manually, use:
$language = new Lang();
$language->setLang('pl'); // for setting language
$language->l('pay'); // to echo translated key