All Projects → plugandpay → tbc-credit-card-payment-gateway-php-lib

plugandpay / tbc-credit-card-payment-gateway-php-lib

Licence: MIT license
PHP library for the TBC credit card payment gateway API.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to tbc-credit-card-payment-gateway-php-lib

PaymentCardView
Custom Credit/Debit card view
Stars: ✭ 62 (-22.5%)
Mutual labels:  credit-card, payment-gateway
J2pay
Multi-gateway payment processing library for java
Stars: ✭ 125 (+56.25%)
Mutual labels:  credit-card, payment-gateway
Checkout Sdk Node
Checkout.com SDK for Node.js. Documentation here:
Stars: ✭ 28 (-65%)
Mutual labels:  credit-card, payment-gateway
Go Payment
Payment Connector for Midtrans and Xendit. Sample site that is using this payment proxy is https://imrenagi.com/donate
Stars: ✭ 136 (+70%)
Mutual labels:  credit-card, payment-gateway
Woocommerce-Fawry-Payment-Gateway
Fawry payment gateway is a powerful payment processor that helps you pay through credit cart & Fawry Machines.
Stars: ✭ 21 (-73.75%)
Mutual labels:  credit-card, payment-gateway
ccashcow
💰 Accept cards & crypto. Payments so easy a cow could do it.
Stars: ✭ 40 (-50%)
Mutual labels:  credit-card, payment-gateway
adyen-node-api-library
Adyen API Library for Node.js
Stars: ✭ 82 (+2.5%)
Mutual labels:  payment-gateway
laravel-pix
Uma solucão simples para integrar sua aplicação Laravel a API PIX do Banco Central do Brasil
Stars: ✭ 73 (-8.75%)
Mutual labels:  payment-gateway
hub20
Self-hosted payment gateway for Ethereum and any ERC20 token, integrates with Raiden for almost-zero fees.
Stars: ✭ 59 (-26.25%)
Mutual labels:  payment-gateway
gringotts payment
Demo Phoenix app showing gringotts payment library integrations.
Stars: ✭ 24 (-70%)
Mutual labels:  payment-gateway
sep-pay
Pay.ir Payment Package for Laravel 5.3+
Stars: ✭ 17 (-78.75%)
Mutual labels:  payment-gateway
PayPalPlugin
Official integration with PayPal Commerce Platform
Stars: ✭ 21 (-73.75%)
Mutual labels:  payment-gateway
borica-3ds
PHP Borica EMV 3DS library
Stars: ✭ 15 (-81.25%)
Mutual labels:  payment-gateway
emv-bertlv-tools
Deciphering EMV data encoded in the not so basic "basic encoding rules".
Stars: ✭ 41 (-48.75%)
Mutual labels:  credit-card
react-credit-cards
Beautiful credit cards for your payment forms
Stars: ✭ 2,386 (+2882.5%)
Mutual labels:  credit-card
PCard
Demo project to showcase adding payment card details using JetPack Compose
Stars: ✭ 61 (-23.75%)
Mutual labels:  credit-card
toss
Toss 결제를 위한 python client library
Stars: ✭ 51 (-36.25%)
Mutual labels:  payment-gateway
python-daraja
Python Wrapper for interacting with the MPESA Daraja API. More Features to be implemented
Stars: ✭ 20 (-75%)
Mutual labels:  payment-gateway
cybersource-sdk-java
Java SDK for CyberSource Simple Order API
Stars: ✭ 44 (-45%)
Mutual labels:  payment-gateway
react-native-payumoney
React Native Payumoney (Android/IOS)
Stars: ✭ 18 (-77.5%)
Mutual labels:  payment-gateway

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:

composer require wearede/tbcpay-php

Creating object

$Payment = new TbcPayProcessor('/cert/tbcpay.pem', '0DhJ4AdxVuPZmz3F4y', $_SERVER['REMOTE_ADDR']);
  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

  • TBC bank provides SSL certificate in .p12 format, we need it in .pem format, to transform use command: openssl pkcs12 -in *.p12 -out tbcpay.pem.
  • Move cert directory somewhere non public as a security meassure. Give it correct permissions so that php can read it.
  • SDK needs outgoing port 18443 open to communicate with TBC. Some hosting services do not allow this.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].