PHPackages                             payisland/payisland-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. payisland/payisland-php

ActiveLibrary[Payment Processing](/categories/payments)

payisland/payisland-php
=======================

Official PHP SDK for integrating with PayIsland payment APIs.

v0.1.0(2mo ago)01MITPHP &gt;=8.1

Since May 22Compare

[ Source](https://github.com/payislandsng/payisland-php)[ Packagist](https://packagist.org/packages/payisland/payisland-php)[ RSS](/packages/payisland-payisland-php/feed)WikiDiscussions Synced 3w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

PayIsland PHP SDK
=================

[](#payisland-php-sdk)

[![CI](https://github.com/payislandsng/payisland-php/actions/workflows/ci.yml/badge.svg)](https://github.com/payislandsng/payisland-php/actions/workflows/ci.yml/badge.svg)

Official PHP SDK for integrating with PayIsland payment APIs.

Installation
------------

[](#installation)

```
composer require payisland/payisland-php
```

Initialization
--------------

[](#initialization)

```
use PayIsland\PayIsland;

$payIsland = new PayIsland([
    'secretKey' => getenv('PAYISLAND_SECRET_KEY'),
]);
```

You may override the API base URL and timeout when needed:

```
$payIsland = new PayIsland([
    'secretKey' => getenv('PAYISLAND_SECRET_KEY'),
    'baseURL' => 'https://ags.payislands.com',
    'timeout' => 30,
]);
```

PayIsland determines sandbox or live mode from the API key. The SDK does not expose a separate environment flag.

Transaction Initialization
--------------------------

[](#transaction-initialization)

```
$response = $payIsland->transactions->initialize([
    'callback_url' => 'https://example.com/webhooks/payislands',
    'payment_item_id' => getenv('PAYISLAND_PAYMENT_ITEM_ID'),
    'transaction_reference' => 'order_' . time(),
    'channel' => 'card',
    'amount' => '1000',
    'customer_info' => [
        'email' => 'ada@example.com',
        'phone_number' => '08011112222',
        'first_name' => 'Ada',
        'last_name' => 'Lovelace',
    ],
]);

echo $response['data']['authorization_url'];
```

Transaction Verification
------------------------

[](#transaction-verification)

```
$response = $payIsland->transactions->verify('order_123');
```

This calls PayIsland's documented transaction status endpoint: `GET /api/v1/transactions/in/check-transaction-status/{reference}`.

For card transactions that require 3DS authentication, verification may return a pending status until the customer completes the challenge or PayIsland receives the final callback/webhook. Do not fulfill an order until verification returns a successful final status.

Webhook Verification
--------------------

[](#webhook-verification)

```
$isValid = $payIsland->webhooks->verifySignature(
    $rawPayload,
    $signature,
    $webhookSecret
);
```

Webhook signatures are verified with `hash_hmac('sha256', $payload, $secret)` and `hash_equals`.

After receiving a webhook, always verify the transaction reference before fulfillment:

```
$payload = json_decode($rawPayload, true);
$verification = $payIsland->transactions->verify($payload['reference']);
```

If verification is still pending after a 3DS card flow, wait for the final callback/webhook or check the transaction status again before fulfilling the order.

Error Handling
--------------

[](#error-handling)

API errors throw `PayIsland\Exceptions\PayIslandApiException`.

```
use PayIsland\Exceptions\PayIslandApiException;

try {
    $response = $payIsland->transactions->verify('order_123');
} catch (PayIslandApiException $exception) {
    echo $exception->getStatusCode();
    print_r($exception->getResponseData());
}
```

Examples
--------

[](#examples)

Copy `.env.example` to `.env`, then set your PayIsland credentials.

```
php examples/initialize-payment.php
php examples/verify-payment.php order_123
php examples/webhook-verification.php
```

Development
-----------

[](#development)

```
composer install
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance87

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

64d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/286728994?v=4)[Payislands](/maintainers/payislandsng)[@payislandsng](https://github.com/payislandsng)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/payisland-payisland-php/health.svg)

```
[![Health](https://phpackages.com/badges/payisland-payisland-php/health.svg)](https://phpackages.com/packages/payisland-payisland-php)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k543.5M2.7k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k46](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
