Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

aknEvrnky/perfect-panel

Repository files navigation

AknEvrnky\PerfectPanel\Client

AknEvrnky\PerfectPanel\Client is a PHP library for interacting with the PerfectPanel API. The library provides a simple, fluent PHP interface for communicating with PerfectPanel.

Installation

The package can be installed via composer:

composer require aknevrnky/perfect-panel

Usage

The library provides several methods to interact with the PerfectPanel API. First, you need to instantiate the PerfectPanel class with your API URI and API Key:

use AknEvrnky\PerfectPanel\Client\PerfectPanel;

$perfectPanel = new PerfectPanel($apiUri, $apiKey);

Get Available Services

$services = $perfectPanel->getServices();

Create an Order

$orderID = $perfectPanel->order($service, $link, $quantity);

Get Order Status

$status = $perfectPanel->status($orderID);

Get Multiple Order Statuses

$orderIDs = [1, 2, 3];
$statuses = $perfectPanel->statuses($orderIDs);

$otherIds = '3,76,32';
$statuses = $perfectPanel->statuses($otherIds);

Check Balance

$balance = $perfectPanel->balance();

Refill Order

$perfectPanel->refill($orderID);

Check Refill Status

$perfectPanel->refillStatus($orderID);

Error Handling

The library will throw an ApiErrorException if the API returns an error. You should use try-catch blocks to handle these exceptions.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Tests

To run tests:

composer test

License

AknEvrnky\PerfectPanel\Client is open-sourced software licensed under the MIT license.

About

Perfect Panel API PHP integration

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages