Search by

rohama / koin-sep

rohama

Koin — SEP (Saman) gateway driver (REST OnlinePG API)

Package info

github.com/rohamaa/Koin-SEP

pkg:composer/rohama/koin-sep

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.2.1 2026-10-23 12:49 UTC

This package is auto-updated.

Last update: 2026-10-23 17:47:49 UTC


README

Docs site · Docs on GitHub

The SEP gateway driver (Bank Saman) for the Koin package — built on SEP's OnlinePG REST API. The Bluepay sub-driver (Rohama\Koin\Sep\BluepayGateway) ships in the same package.

Install

composer require rohama/koin-sep

Features

  • Payment request — returns token + redirect URL
  • Verify
  • Refund
  • Callback parsing

Configuration

Field Description
apiKey API key

Usage

use Rohama\Koin\Sep\SepGateway;
use Rohama\Koin\Support\PaymentStatus;

$gateway = new SepGateway('api-key', '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/