2017 © Pedro Peláez
 

library bank-emulator-sdk

PHP SDK for Bank Emulator Gateway

image

fintech-fab/bank-emulator-sdk

PHP SDK for Bank Emulator Gateway

  • Wednesday, June 18, 2014
  • by mikanoz
  • Repository
  • 3 Watchers
  • 0 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Bank Emulator SDK

SDK for Bank Emulator (https://github.com/fintech-fab/bank-emulator), (*1)

  • Documentation: http://fintech-fab.ru/bank/emulator/demo/sdk
  • Public demo: http://fintech-fab.ru/bank/emulator/demo

Requirements

  • php >=5.3.0
  • php5-curl

Installation (composer)

{
    "require": {
        "fintech-fab/bank-emulator-sdk": "dev-master",
    },
}

Simple usage


use FintechFab\BankEmulatorSdk\Config; use FintechFab\BankEmulatorSdk\Gateway; use FintechFab\BankEmulatorSdk\OnlineFormWidget; $config = array( 'terminalId' => 'your-terminal-id', 'secretKey' => 'your-terminal-secret-key', 'gatewayUrl' => 'url-to-gateway', 'callbackEmail' => 'your-email-for-callback-info', 'shopUrl' => 'url-to-your-shop', 'callbackUrl' => 'url-to-your-shop-callback', 'currency' => 'RUB', 'strongSSL' => false, ); Config::setAll($config); // Start with payment 'auth' $gatewayAuth = Gateway::newInstance(); $params = array( 'orderId' => '123456', 'orderName' => 'Order from My Example', 'orderDesc' => '', 'orderAmount' => '123.45', 'cardNumber' => '4532274626451231', 'expiredYear' => '15', 'expiredMonth' => '12', 'cvcCode' => '333', ); $successAuth = $gatewayAuth->auth($params); if($successAuth){ // processing your payment operation and 'complete' sale $gatewayComplete = Gateway::newInstance(); $params = array( 'orderId' => $gatewayAuth->getResultOrderId(), 'orderAmount' => $gatewayAuth->getResultAmount(), 'rrn' => $gatewayAuth->getResultRRN(), 'irn' => $gatewayAuth->getResultIRN(), ); $successComplete = $gatewayComplete->complete($params); if($successComplete){ // Cancellation process your payment 'refund' $gatewayRefund = Gateway::newInstance(); $successRefund = $gatewayRefund->refund($params); } } // Render HTML for e-commerce payment button OnlineFormWidget::render(123456, 123.45);

The Versions

18/06 2014

dev-master

9999999-dev http://fintech-fab.ru/bank/emulator/demo

PHP SDK for Bank Emulator Gateway

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Vladimir Yuldashev
by Mikhail Novikov

sdk e-commerce finance payments