PHPackages                             husail/paystore-sdk - 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. husail/paystore-sdk

ActiveLibrary[Payment Processing](/categories/payments)

husail/paystore-sdk
===================

PayStore PHP SDK

v1.0.0-alpha(10mo ago)022MITPHPPHP ^8.1

Since Jul 3Pushed 10mo agoCompare

[ Source](https://github.com/husail/paystore-sdk)[ Packagist](https://packagist.org/packages/husail/paystore-sdk)[ Docs](https://github.com/husail/paystore-sdk)[ RSS](/packages/husail-paystore-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (14)Versions (2)Used By (0)

PayStore PHP SDK
================

[](#paystore-php-sdk)

The **PayStore PHP SDK** allows integration with the PayStore API in **any PHP project**. It also provides **Facades** and a **Service Provider** for enhanced **Laravel** integration.

---

📦 Installation
--------------

[](#-installation)

```
composer require husail/paystore-sdk
```

---

🔧 Usage Example
---------------

[](#-usage-example)

### **For Non-Laravel PHP Projects:**

[](#for-non-laravel-php-projects)

**Basic Usage:**

```
require 'vendor/autoload.php';

use Husail\PayStore\Client;
use Husail\PayStore\Authentication;

$client = new Client(
    new Authentication(token: 'your-token')
);

$response = $client->merchant->all();
if ($response->successful()) {
    // Handle the response
}
```

**With Logging:**

```
require 'vendor/autoload.php';

use Monolog\Logger;
use Husail\PayStore\Client;
use Monolog\Handler\StreamHandler;
use Husail\PayStore\Authentication;
use Husail\PayStore\HttpClient\Message\Formatter\SimpleFormatter;

$logger = new Logger('my_logger');
$logger->pushHandler(new StreamHandler(__DIR__ . '/paystore.log'));

$client = new Client(
    new Authentication(token: 'your-token'),
    logger: $logger,
    formatter: new SimpleFormatter(true) // 'true' enables pretty-printed JSON logs
);

$response = $client->merchant->all();
if ($response->successful()) {
    // Handle the response
}
```

---

### **For Laravel:**

[](#for-laravel)

1. **Publish the configuration**:

    ```
    php artisan vendor:publish --provider="Husail\PayStore\PayStoreServiceProvider"
    ```
2. **Add environment variables** in your `.env` file:

    ```
    PAYSTORE_TOKEN=your-token

    # Optional logging settings:
    PAYSTORE_LOG_ENABLED=false             # Enable or disable request/response logging
    PAYSTORE_LOG_FORMATTER_EXPANDED=false  # Pretty-print JSON in logs if enabled
    ```
3. **Use the Facade to interact with the API:**

```
use PayStore;

$response = PayStore::client()->merchant->all();
if ($response->successful()) {
    // Handle the response
}
```

4. **Configure Logging**

    When `PAYSTORE_LOG_ENABLED` is set to `true`, the SDK logs request and response details via Laravel's default logging channel. By default, logs output compact JSON. If you want the JSON output to be more readable (pretty-printed), set `PAYSTORE_LOG_FORMATTER_EXPANDED` to `true`.

---

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Feel free to submit issues or pull requests to help improve the SDK.

---

📜 License
---------

[](#-license)

Licensed under the [MIT License](LICENSE.md).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance54

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

311d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d639b59331f31fc8422a8172c75d8b7ff59c37dd60a16035c1a468aacb9b1823?d=identicon)[victordanilo](/maintainers/victordanilo)

---

Top Contributors

[![victordanilo](https://avatars.githubusercontent.com/u/4293184?v=4)](https://github.com/victordanilo "victordanilo (4 commits)")

---

Tags

paystorepaystore-sdk

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/husail-paystore-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/husail-paystore-sdk/health.svg)](https://phpackages.com/packages/husail-paystore-sdk)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M64](/packages/opensearch-project-opensearch-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)

PHPackages © 2026

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