mysiar / omnipay-przelewy24v1
Przelewy24 API v1 driver for the Omnipay payment processing library
Installs: 1 873
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 3
Open Issues: 1
Requires
- php: ^7.2|^8.0
- ext-bcmath: *
- ext-json: *
- omnipay/common: ^3
Requires (Dev)
- omnipay/tests: ^4
- symfony/var-dumper: ^5.4
- symplify/easy-coding-standard: ^10.2
This package is auto-updated.
Last update: 2024-11-30 02:18:57 UTC
README
Przelewy24 API V1 gateway for the Omnipay PHP payment processing library
API endpoints implemented
Install
This gateway can be installed with Composer:
$ composer require mysiar/omnipay-przelewy24v1
Usage
The following gateways are provided by this package:
- Przelewy24
Reference official documentation https://developers.przelewy24.pl/index.php?en
Example
require_once __DIR__ . '/vendor/autoload.php'; use Omnipay\Omnipay; /** @var \Omnipay\Przelewy24\Gateway $gateway */ $gateway = Omnipay::create('Przelewy24'); $gateway->initialize([ 'merchantId' => 'YOUR MERCHANT ID HERE', 'posId' => 'YOUR POS ID HERE', 'crc' => 'YOUR CRC KEY HERE', 'reportKey' => 'YOUR REPORT KEY HERE' 'testMode' => true, ]); $params = [ 'sessionId' => 2327398739, 'amount' => 12.34, 'currency' => 'PLN', 'description' => 'Payment test', 'email' => 'franek@dolas.com', 'country' => 'PL', 'returnUrl' => 'www.your-domain.pl/return_here', 'notifyUrl' => 'www.your-domain.pl/notify_here', ]; $response = $gateway->purchase($params)->send();
For more examples check
Optionally you can specify the payment channels.
$gateway->initialize([ //[...] 'channel' => Gateway::P24_CHANNEL_CC, ]); // or $gateway->setChannel(Gateway::P24_CHANNEL_CC);
Optionally you can specify language (default: en).
$gateway->initialize([ //[...] 'language' => 'pl', ]); // or $gateway->setLanguage('pl');