bionyxxx/wijayapay-php

WijayaPay Payment Gateway PHP Library

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/bionyxxx/wijayapay-php

v1.0.2 2025-12-16 17:36 UTC

This package is auto-updated.

Last update: 2025-12-16 17:37:19 UTC


README

This is the official PHP wrapper for the WijayaPay Payment Gateway API.

Installation

composer require bionyxxx/wijayapay-php --dev

Usage

Configuration

use WijayaPay\Config;
use WijayaPay\WijayaPay;

$config = new Config(
    'YOUR_MERCHANT_CODE', // code_merchant
    'YOUR_API_KEY',       // api_key
    true                  // isProduction (true/false)
);

$wijayaPay = new WijayaPay($config);

Get Payment Channels

Get the list of active payment channels.

try {
    $channels = $wijayaPay->payment()->getChannels();
    print_r($channels);
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}

Create Transaction

Create a new payment request.

try {
    $response = $wijayaPay->transaction()->create([
        'ref_id'       => 'ORDER-12345',
        'code_payment' => 'QRIS',
        'nominal'      => 100000,
        // Add other parameters if needed
    ]);

    print_r($response);
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}

Check Transaction Status

Check the status of a transaction using its reference ID.

try {
    $refId = 'ORDER-12345';
    $status = $wijayaPay->transaction()->checkStatus($refId);
    print_r($status);
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}

Webhook Handling

Handle incoming callbacks from WijayaPay.

use WijayaPay\Webhook\WebhookHandler;

$handler = new WebhookHandler();

// Get the data
$data = $handler->parse();

// Process your logic here with $data...
// e.g. update transaction status in database

// Return success response to WijayaPay
header('Content-Type: application/json');
echo $handler->successResponse();