rohama / koin-idpay
IDPay gateway driver for Koin Package (REST API v1.1)
2.2.1
2026-10-23 08:09 UTC
Requires
- php: ^8.0
- rohama/koin-core: ^2.2.1
Requires (Dev)
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.5 || ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-23 17:45:51 UTC
README
The IDPay gateway driver for the Koin package โ built on IDPay's REST API v1.1.
Install
composer require rohama/koin-idpay
Features
- Payment request โ returns id + StartPay redirect URL
- Verify
- Inquiry
- Transaction list
- Callback parsing
- Sandbox
Configuration
| Field | Description |
|---|---|
apiKey |
36-char API key |
sandbox |
IDPay's official test mode |
Usage
use Rohama\Koin\IDPay\IDPayGateway; use Rohama\Koin\Support\PaymentStatus; $gateway = new IDPayGateway('api-key-36-chars', 'https://example.com/callback'); $payment = $gateway->request(150000, 'ORDER-1', 'Subscription purchase'); if ($payment->isSuccessful()) { header('Location: ' . $payment->redirectUrl); exit; } // In the callback page โ parseCallback runs verify() before reporting success $callback = $gateway->parseCallback($_GET, $_POST); if ($callback->status === PaymentStatus::SUCCESS) { // Verified }
refund()(in gateways that offer Refund) is available only when the developer-only 5th constructor parameter (refundable) is enabled.
Full documentation: https://rohamaa.github.io/Koin-Core/