Search by

rohama / koin-idpay

rohama

IDPay gateway driver for Koin Package (REST API v1.1)

Package info

github.com/rohamaa/Koin-IDPay

pkg:composer/rohama/koin-idpay

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.2.1 2026-10-23 08:09 UTC

This package is auto-updated.

Last update: 2026-10-23 17:45:51 UTC


README

Docs site ยท Docs on GitHub

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/