Skip to content

shacky/tpay-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tpay.com

Library for all payment methods available in tpay.com

Installation

Install via composer:

composer require tpay-com/tpay-php

Install via git over ssh:

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

Install via git over https:

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

manual download: https://github.com/tpay-com/tpay-php/archive/master.zip

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 merchant panel (https://secure.tpay.com/panel)

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).

All methods described in tpay documentations can be easily executed by extending required class in main src folder (see examples)

###Example configuration data should look like this:

merchantId - merchant id ex. 1010

merchantSecret - merchant secret ex. demo

Basic Payments and bank selection forms:

Example of usages: Basic, Bank selection form, eHat form

Transaction API / create, get, refund, report

Example of usages: Create transaction, Refund Transaction

Card Basic / Card On-Site

Example of usages: Card basic form, Card On-site Gateway

Szkwal / White Label

Example of usages: Szkwal, White Label

DAC / Masspayment / Transaction API requests

Example of usages: DAC, Masspayment and Transaction API

Library has own logging system to save all confirmations and notifications sent by Tpay.com server Be sure that file src/log is writable and add rule to htaccess to deny access to this file from browser

Requirements

  • PHP > 5.6.0

Language

For this moment library supports two languages (EN, PL). Default language is english. Change language example:

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

//After this line all static messages (input labels, buttons titles) will be displayed in Polish
Lang::setLang('pl');

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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 81.0%
  • HTML 7.8%
  • CSS 6.9%
  • JavaScript 4.3%