Download the PHP package wearede/tbcpay-php without Composer

On this page you can find all versions of the php package wearede/tbcpay-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tbcpay-php

face_post_tbc_payment

TBC Credit Card Payment Gateway (php-library)

Making credit card payments work on your website (through a local bank) is pain! So to make everyone's life a bit easier we are sharing this php-library on GitHub.

SMS / DMS

There are two types of transaction within this system: SMS and DMS.

SMS - is a direct payment method, money is charged in 1 event, as soon as customer enters the credit card details and clicks proceed.
DMS - is a two step method, first event blocks the money on the card (max 30 days), second event captures the money (second event can be carried out when product is shipped to the customer for example).

Every 24 hours, a merchant must close the business day.

Install

It is possible to simply include this library see example, but you should use composer instead.

run in terminal:

Creating object

  1. Certificate absolute path
  2. Certificate passphrase
  3. Client ip address

Methods

Method name --- | sms_start_transaction() dms_start_authorization() dms_make_transaction($trans_id) get_transaction_result($trans_id) reverse_transaction($trans_id, $amount = '', $suspected_fraud = '') refund_transaction($trans_id) credit_transaction($trans_id, $amount = '') close_day()

Example implementations

Instructions

Relevant to a simple example here.

Chores

  1. Ask TBC to generate a certificate.
  2. Tell TBC your server IP so they can whitelist it.
  3. create example.com/ok.php and example.com/fail.php urls and communicate these to TBC.
    • ok url - is used for redirecting back user in almost all situations (even when card has insuficient funds and transaction fails!).
    • fail url - is used for redirecting back user when technical error occurs (very rare).

Flow

  1. start.example Here we start our process. We call TBC servers using sms_start_transaction() and get $trans_id in return.
    • We use returned $trans_id to redirect user to a TBC page, where credit card info can be entered.
    • After user fills out card info he is thrown back to our ok.example url on our server.
  2. Take a look at ok.example We get $trans_id back from TBC, and we plug that in get_transaction_result($trans_id).
  3. get_transaction_result($trans_id) tells us if transaction was success or not. array('RESULT' => 'OK') for example is success message, transaction went through.

Common issues


All versions of tbcpay-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wearede/tbcpay-php contains the following files

Loading the files please wait ....