2017 © Pedro Peláez
 

library tpay-php

tpay.com library

image

tpay-com/tpay-php

tpay.com library

  • Tuesday, July 17, 2018
  • by piotrjozwiak
  • Repository
  • 4 Watchers
  • 10 Stars
  • 1,932 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 1 Open issues
  • 14 Versions
  • 27 % Grown

The README.md

Tpay

Library for all payment methods available in Tpay., (*1)

Latest stable version PHP version License CI status Type coverage, (*2)

Polish version :poland: wersja polska, (*3)

Installation

Install via Composer:, (*4)

composer require tpay-com/tpay-php

Install via Git over SSH:, (*5)

git clone git@github.com:tpay-com/tpay-php.git

Install via Git over HTTPS:, (*6)

git clone https://github.com/tpay-com/tpay-php.git

Manual download: https://github.com/tpay-com/tpay-php/archive/master.zip, (*7)

Configuration

The only thing you need to do is to set your API access data via $this-> (see examples). You can generate access keys in Tpay's merchant panel., (*8)

The loader.php file handles all required class loading, so you can include this file to any file you are editing. (remember to configure your current working path correctly)., (*9)

All methods described in Tpay documentation can be easily executed by extending required class in main src directory (see examples)., (*10)

Basic Payments and bank selection forms

Example of usages: basic, bank selection HTML form, bank selection API form, BLIK form., (*11)

Transaction API / create, get, refund, report

Example of usages: create transaction, refund transaction, refund transaction status., (*12)

Card Basic / Card On-Site

Example of usages: card basic form, card on-site gateway, card payment links builder, card on-site gateway with saved cards., (*13)

Logs

Library has own logging system to save all confirmations and notifications sent by Tpay.com server, outgoing requests and exceptions. Be sure that file src/Logs directory is writable and add rule to Apache .htaccess or NGINX to deny access to this area from browser. The log files are created for each day separately under Logs directory., (*14)

The logging is enabled by default, but you can disable this feature with: php Logger::disableLogging();, (*15)

You can also set your own logging path by this command: php Logger::setLogPath('/my/own/path/Logs/');, (*16)

You can also set you own Logger by this command it has to be compatible with Psr\Log\LoggerInterface:, (*17)

Logger::setLogger(new CustomLogger());

The logs file names will be assigned automatically., (*18)

Custom templates path

You can set your own templates path, so you can copy and modify the phtml template files from this library. php Util::$customTemplateDirectory = '/my/own/templates/path/';, (*19)

Language

Currently, the library supports two languages (English and Polish). Default language is English. Changing language example:, (*20)

// 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

License

This library is released under the MIT License, but uses third party libraries that are distributed under their own terms (see LICENSE-3RD-PARTY.md)., (*21)

The Versions

17/07 2018

dev-master

9999999-dev

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

02/05 2018

2.0.7

2.0.7.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

03/01 2018

2.0.6

2.0.6.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

09/10 2017

2.0.5

2.0.5.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

04/10 2017

2.0.4

2.0.4.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

29/09 2017

2.0.3

2.0.3.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

22/09 2017

2.0.2

2.0.2.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

05/07 2017

2.0.1

2.0.1.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

27/06 2017

2.0.0

2.0.0.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.6.0
  • ext-curl *

 

31/05 2017

1.0.5

1.0.5.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.3.0
  • ext-curl *

 

26/05 2017

1.0.4

1.0.4.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.4.0
  • ext-curl *

 

04/04 2017

1.0.3

1.0.3.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.4.0
  • ext-curl *

 

08/03 2017

1.0.2

1.0.2.0

tpay.com library

  Sources   Download

LGPL-3.0

The Requires

  • php >=5.4.0
  • ext-curl *

 

07/03 2017

1.0.0

1.0.0.0

tpay.com PHP library

  Sources   Download

The Requires