The CodeIgniter integration is available at OrcusHQ/orcuspay-codeigniter.

Requirements

  • PHP 7.4 or newer
  • CodeIgniter 3 or CodeIgniter 4
  • Orcuspay access and secret keys

Install

composer require orcushq/orcuspay-codeigniter
If the package is not published to Packagist yet, install from GitHub:
composer config repositories.orcuspay-codeigniter vcs https://github.com/OrcusHQ/orcuspay-codeigniter
composer config repositories.orcuspay-php vcs https://github.com/OrcusHQ/orcuspay-php
composer require orcushq/orcuspay-codeigniter:dev-main

CodeIgniter 4 usage

use OrcusPay\CodeIgniter\Libraries\Orcuspay;

$orcuspay = new Orcuspay([
    'access_key' => 'ak_test_xxxxx',
    'secret_key' => 'sk_test_xxxxx',
]);

$session = $orcuspay->createCheckoutSession([
    'amount' => 10000,
    'currency' => 'BDT',
    'success_url' => site_url('payment/success'),
    'cancel_url' => site_url('payment/cancel'),
]);

CodeIgniter 3 usage

Copy or autoload the library from application/libraries/Orcuspay.php, then initialize it with your Orcuspay keys.
$this->load->library('orcuspay', [
    'access_key' => 'ak_test_xxxxx',
    'secret_key' => 'sk_test_xxxxx',
]);

$session = $this->orcuspay->createCheckoutSession([
    'amount' => 10000,
    'currency' => 'BDT',
    'success_url' => site_url('payment/success'),
    'cancel_url' => site_url('payment/cancel'),
]);

Notes

  • Use test keys until your checkout flow is verified.
  • Configure webhook/IPN routes in your app so orders can update after payment success.