Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bileto/omnipay-csob
ČSOB driver for the Omnipay PHP payment processing library
https://github.com/bileto/omnipay-csob
csob csob-gateway omnipay
Last synced: 3 days ago
JSON representation
ČSOB driver for the Omnipay PHP payment processing library
- Host: GitHub
- URL: https://github.com/bileto/omnipay-csob
- Owner: bileto
- Created: 2015-06-24T15:46:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-13T13:38:46.000Z (over 1 year ago)
- Last Synced: 2024-09-20T00:41:49.216Z (about 2 months ago)
- Topics: csob, csob-gateway, omnipay
- Language: PHP
- Homepage:
- Size: 43 KB
- Stars: 3
- Watchers: 16
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Omnipay: ČSOB
**ČSOB driver for the Omnipay PHP payment processing library**
[Omnipay](https://github.com/thephpleague/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](https://github.com/csob/paymentgateway/wiki)
## Installation
Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it
to your `composer.json` file:```json
{
"require": {
"bileto/omnipay-csob": "~0.5"
}
}
```
## TL;DR
```php
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 `[email protected]` with your MerchantIds (sandbox and production). This functionality will be available September 2016.