routegroup / php-ing-pay
ING Pay payment gateway client for plain PHP
v1.0.0
2026-10-31 13:50 UTC
Requires
- php: ^8.4
- justinrainbow/json-schema: ^6.10.0
Requires (Dev)
- fakerphp/faker: ^1.24
- guzzlehttp/guzzle: ^7.9||^8.0
- laravel/pint: ^1.30.5
- nyholm/psr7: ^1.8
- pestphp/pest: ^5.3
- pestphp/pest-plugin-phpstan: ^5.2
- pestphp/pest-plugin-rector: ^5.0
- phpstan/phpstan: ^2.1
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.1||^2.0
- rector/rector: ^2.8
Suggests
- fakerphp/faker: Required by the test factories (Payload::factory()); this package does not need it at runtime.
- guzzlehttp/guzzle: A PSR-18 client that Psr18Client::guzzle() wires up in one line; any other PSR-18 client works too.
- psr/http-client: Required only by Psr18Client, to drive this package with an HTTP client you already have.
- psr/http-factory: Required only by Psr18Client, alongside psr/http-client.
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-31 14:04:16 UTC
README
A client for the ING Pay payment gateway, written in plain PHP with no framework
dependency. Using Laravel? Install routegroup/laravel-ing-pay instead.
Documentation: https://php-ing-pay.routegroup.pl
Installation
PHP 8.4 or newer. Add the package, and Guzzle to send its requests:
composer require routegroup/php-ing-pay guzzlehttp/guzzle
Usage
use Routegroup\IngPay\Api; use Routegroup\IngPay\Api\CreateTransactionRequest; use Routegroup\IngPay\Http\Psr18Client; use Routegroup\IngPay\Lib\Config; use Routegroup\IngPay\Lib\Url; use Routegroup\IngPay\Types\Currency; use Routegroup\IngPay\Types\Environment; use Routegroup\IngPay\Types\PaymentMethod; use Routegroup\IngPay\Types\PaymentMethodCode; $config = new Config( merchantId: 'your-merchant-id', serviceId: 'your-service-id', serviceKey: 'your-service-key', apiKey: 'your-api-key', env: Environment::SANDBOX, ); $api = new Api(Psr18Client::guzzle(), $config, new Url($config)); $response = $api->createTransaction(new CreateTransactionRequest([ 'amount' => 4999, 'currency' => Currency::PLN, 'orderId' => 'ORDER-1042', 'paymentMethod' => PaymentMethod::PAY_BY_LINK, 'paymentMethodCode' => PaymentMethodCode::ING, 'successReturnUrl' => 'https://shop.example/orders/1042/paid', 'failureReturnUrl' => 'https://shop.example/orders/1042/failed', 'customer' => ['firstName' => 'Anna', 'lastName' => 'Kowalska', 'email' => 'anna@example.com'], ])); $response->transaction->id;
The documentation covers the paywall, payment links, the card widget, notifications, refunds and testing.
Development
composer test runs the same lint, type and test gate as CI, for example
docker compose run --rm app composer test.
Licence
MIT. See LICENSE.md.