PHPackages                             cheng-xu-yuan1995/cregis-sdk-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. cheng-xu-yuan1995/cregis-sdk-php

ActiveProject

cheng-xu-yuan1995/cregis-sdk-php
================================

cregis-sdk-php

1.0.1(2y ago)02PHPPHP ^7.0 || ^8.0

Since Apr 18Pushed 2y agoCompare

[ Source](https://github.com/ChengXuyuan1995/cregis-sdk-php)[ Packagist](https://packagist.org/packages/cheng-xu-yuan1995/cregis-sdk-php)[ RSS](/packages/cheng-xu-yuan1995-cregis-sdk-php/feed)WikiDiscussions main Synced 1mo ago

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

cregis-sdk-php
==============

[](#cregis-sdk-php)

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

[](#installation)

### Method 1: Command-line installation

[](#method-1-command-line-installation)

```
composer require cregis/cregis-sdk-php
```

### Method 2: Installation via composer configuration

[](#method-2-installation-via-composer-configuration)

1. Add the following configuration to your composer.json file:

```
{
    "require": {
        "cregis/cregis-sdk-php": "^1.0"
    }
}
```

2. Run the command:

```
composer install

```

Usage
-----

[](#usage)

1. Create CregisController.php file:

```
use Cregis\Dispatch\CregisDispatch;

class CregisController {
    protected $cregisDispatch;

    public function __construct() {
        // Controller initialization
        $this->initialize();
    }

    protected function initialize() {
        $this->cregisDispatch = new CregisDispatch([
            'project_no' => 138XXXXXXXXXXX6576,  // Project number
            'api_key' => 'XXXXXXXXXXXXXXXXXXXXXx',  // API key
            'endpoint'=> 'https://xxxxxx.xxxxxx.xxx',  // Node address
            'callUrl'=> 'https://localhost/callUrl'  // Recharge callback URL
        ]);
    }
}
```

2. In the class where you need to use the API, extend CregisController:

```
## Example of usage
namespace xxxx;

class Index extends CregisController {
    $project_no = 11112222;

    // Get the supported currencies of the project
    public function coinslist() {
        $result =  $this->cregisDispatch->coinslist($project_no);
        return json($result);
    }

    // Create an address: Parameters - project number, currency code, alias, callback URL
    public function createAddress() {
        $result =  $this->cregisDispatch->createAddress($project_no, 60, 'test01', $callUrl);
        return json($result);
    }

    // Check the validity of an address: Parameters - project number, currency code, address
    public function addressLegal() {
        $result =  $this->cregisDispatch->addressLegal($project_no, 60, '0x8fabec737e3e724f1fc4537da44f84029c7879b9');
        return json($result);
    }

    // Check if an address exists: Parameters - project number, currency code, address
    public function addressInner() {
        $result =  $this->cregisDispatch->addressInner($project_no, 60, '0x8fabec737e3e724f1fc4537da44f84029c7879b9');
        return json($result);
    }

    // Apply for a withdrawal: Parameters - project number, currency code, address, amount, withdrawal callback URL, business reference number, note
    public function withdraw() {
        $result =  $this->cregisDispatch->payout($project_no, '60@60', '0x8fabec737e3e724f1fc4537da44f84029c7879b9', 0.05, $callUrl, "OR" . time(), 'Note');
        return json($result);
    }

    // Query a withdrawal: Parameters - project number, order number
    public function payoutQuery() {
        $result =  $this->cregisDispatch->payoutQuery($project_no, 1390260293664768);
        return json($result);
    }

    // Handle recharge transaction callback (Customize as per business requirements)
    public function changeBackUrl() {
        $result =  $this->cregisDispatch->changeBackUrl();
        return json($result);
    }

    // Handle withdrawal transaction callback (Customize as per business requirements)
    public function withdrawalBackUrl() {
        $result =  $this->cregisDispatch->withdrawalBackUrl();
        return json($result);
    }
}
```

Others
------

[](#others)

```
##curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
If you encounter the above error, you need to add a CA certificate.

##Enable SSL in php.ini
extension=php_openssl.dll;

##Certificate path
openssl.cafile=D:\cacert.pem

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% 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

760d ago

### Community

Maintainers

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

---

Top Contributors

[![lehoel1](https://avatars.githubusercontent.com/u/109498100?v=4)](https://github.com/lehoel1 "lehoel1 (8 commits)")[![ChengXuyuan1995](https://avatars.githubusercontent.com/u/167433088?v=4)](https://github.com/ChengXuyuan1995 "ChengXuyuan1995 (3 commits)")[![TestAdmin007](https://avatars.githubusercontent.com/u/44860465?v=4)](https://github.com/TestAdmin007 "TestAdmin007 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cheng-xu-yuan1995-cregis-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/cheng-xu-yuan1995-cregis-sdk-php/health.svg)](https://phpackages.com/packages/cheng-xu-yuan1995-cregis-sdk-php)
```

###  Alternatives

[justmd5/pinduoduo-sdk

拼多多API SDK【拼多多开放平台】.

23514.1k1](/packages/justmd5-pinduoduo-sdk)[96qbhy/tt-microapp

字节跳动小程序sdk

728.9k](/packages/96qbhy-tt-microapp)[96qbhy/baidu-aip

百度 AI 开放平台 php-sdk

633.9k](/packages/96qbhy-baidu-aip)[uduncloud/udun-wallet-sdk

udun-wallet-sdk

152.9k](/packages/uduncloud-udun-wallet-sdk)

PHPackages © 2026

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