dev-master
9999999-dev http://fintech-fab.ru/bank/emulator/demoPHP SDK for Bank Emulator Gateway
MIT
The Requires
- php >=5.4.0
The Development Requires
by Vladimir Yuldashev
by Mikhail Novikov
sdk e-commerce finance payments
Wallogit.com
2017 © Pedro Peláez
PHP SDK for Bank Emulator Gateway
SDK for Bank Emulator (https://github.com/fintech-fab/bank-emulator), (*1)
{
"require": {
"fintech-fab/bank-emulator-sdk": "dev-master",
},
}
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);
PHP SDK for Bank Emulator Gateway
MIT
sdk e-commerce finance payments