bileto / omnipay-tatrabank
TatraBank gateway for Omnipay payment processing library
Installs: 13 732
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 15
Forks: 1
Open Issues: 0
Requires
- omnipay/common: ~2.5
Requires (Dev)
- mockery/mockery: ^0.9.4
- omnipay/tests: ^2.0
- symfony/var-dumper: ^2.7
- vlucas/phpdotenv: ^2.4
This package is auto-updated.
Last update: 2024-11-29 04:30:37 UTC
README
TatraBank driver for the Omnipay PHP payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements TatraBank Online Payment Gateway support for Omnipay.
TatraBank does not provide sandbox environment, but they provide this online Testing form.
Docs
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json
file:
{ "require": { "bileto/omnipay-tatrabank": "~0.2" } }
TL;DR
use Omnipay\Tatrabank\GatewayFactory; $secureKey = "3132333435363738393031323334353637383930313233343536373839303132"; $gateway = GatewayFactory::createInstance($secureKey); try { $merchantId = 'A1029DTmM7'; $orderNo = '12345677'; $returnUrl = 'http://localhost:8000/gateway-return.php'; $description = 'Shopping at myStore.com (Lenovo ThinkPad Edge E540, Shipping with PPL)'; $purchase = new \Omnipay\Csob\Purchase($merchantId, $orderNo, $returnUrl, $description); $purchase->setCart([ new \Omnipay\Csob\CartItem("Notebook", 1, 1500000, "Lenovo ThinkPad Edge E540..."), new \Omnipay\Csob\CartItem("Shipping", 1, 0, "PPL"), ]); /** @var \Omnipay\Csob\Message\ProcessPaymentResponse $response */ $response = $gateway->purchase($purchase->toArray())->send(); // Payment init OK, redirect to the payment gateway echo $response->getRedirectUrl(); } catch (\Exception $e) { dump((string)$e); }
#Notes
There is also list of 3rd party fake gateways, but HMAC version is not present.