bileto / omnipay-csob
ČSOB gateway for Omnipay payment processing library
Installs: 16 975
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 16
Forks: 2
Open Issues: 1
Requires
- ext-json: *
- ext-openssl: *
- omnipay/common: 2.5.*
Requires (Dev)
- mockery/mockery: 0.9.*
- omnipay/tests: 2.0.*
- symfony/var-dumper: 3.1.*
README
ČSOB 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 ČSOB Online Payment Gateway support for Omnipay.
ČSOB Online Payment Gateway documentation
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json
file:
{ "require": { "bileto/omnipay-csob": "~0.5" } }
TL;DR
use Omnipay\Csob\GatewayFactory; $publicKey = __DIR__ . '/tests/unit/Sign/assets/mips_iplatebnibrana.csob.cz.pub'; $privateKey = __DIR__ . '/tests/unit/Sign/assets/rsa_A1029DTmM7.key'; $gateway = GatewayFactory::createInstance($publicKey, $privateKey); 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); }
Settings
If you would like to use PLN
and HUF
currencies, you need to send email to akceptacekaret@csob.cz
with your MerchantIds (sandbox and production). This functionality will be available September 2016.