PHPackages                             xlext/weapp-php-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. xlext/weapp-php-sdk

ActiveLibrary

xlext/weapp-php-sdk
===================

Weapp sdk of php

1.0.1(7y ago)116Apache-2.0PHPPHP &gt;=5.6.0

Since Nov 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/yishixincheng/Xl_WeApp_SDK)[ Packagist](https://packagist.org/packages/xlext/weapp-php-sdk)[ Docs](https://github.com/yishixincheng/Xl_WeApp_SDK)[ RSS](/packages/xlext-weapp-php-sdk/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Xl\_WeApp\_SDK 使用说明
===================

[](#xl_weapp_sdk-使用说明)

\##介绍

基于腾讯云提供的sdk进行改装，提供了小程序后端登录和微信支付接口； 无内置数据表操作，只提供相关接口，方便与其他框架集成。

注明：客户端依然可以使用腾讯云SDK，仅支持小程序登录。

\##安装

使用 PHP 包依赖管理工具 `composer` 执行以下命令安装

```
composer require xlext/weapp-php-sdk
```

\##使用说明

\######初始化注入配置信息：

```
use Xl_WeApp_SDK\App as App;

App::run([
   'AppId'=>'',  //必填
   'AppSecret'=>'', //必填
   'Mchid'=>'',     //使用支付功能必填
   'KEY'=>'',       //同上
   'NOTIFY_URL'=>'', //支付异步通知
   'SSLCERT_PATH'=>'', //支付接口需要签名必填
   'SSLKEY_PATH'=>''   //支付接口需要签名必填
]);
```

\######登录：

```
$loginService=App::getService("Login");

$loginService->login(function($method,$params){

    swtich($method){
        case "findUserByOpenId":  //根据openid从数据表获取用户信息
        $result="";
        break;
        case "storeUserInfo":  //更新存储用户信息
        $result="";
        break;

    }
    return $result;

});

//check登录

$loginService->check(function($method,$params){

    if($method=="findUserBySKey"){
         //根据skey从数据表获取用户信息
         return $userinfo;
    }

});
```

\######支付：

```
$payService=App::getService("Pay");

//支付请求
$payService->unifiedOrder([
     'out_trade_no'=>'', //商户订单号
     'body'=>'',   //订单说明
     'total_fee'=>'', //金额（分）
     'trade_type'=>'JSAPI',
     'openid'=>''    //通过登录接口获取用户openid
]);

//订单查询
$payService->orderQuery([
      'out_trade_no'=>'', //商户订单号
      'transaction_id'=>''  //交易号
]);

//...其他接口见源码

//支付回调

use Xl_WeApp_SDK\Lib\WxPayNotify as WxPayNotify;

$notify=new WxPayNotify();

$notify->handle(function($result,&$msg){

    if($result['return_code']=="SUCCESS"){

         //支付成功执行商户逻辑

         return true;

    }else{
         $msg=$result['return_msg'];

         return false;
    }

});
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

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

2739d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/424ac1ae608eabc34edd6c56e24b1de70d79a6ba157ff8dd656197876b292a80?d=identicon)[yishixincheng](/maintainers/yishixincheng)

---

Top Contributors

[![zimeng](https://avatars.githubusercontent.com/u/4110868?v=4)](https://github.com/zimeng "zimeng (11 commits)")[![yishixincheng](https://avatars.githubusercontent.com/u/13924775?v=4)](https://github.com/yishixincheng "yishixincheng (1 commits)")

---

Tags

phpsdkweappxl

### Embed Badge

![Health badge](/badges/xlext-weapp-php-sdk/health.svg)

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

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[microsoft/azure-storage-queue

This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage Queue APIs.

142.6M16](/packages/microsoft-azure-storage-queue)[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2713.7k](/packages/cryptonator-merchant-php-sdk)

PHPackages © 2026

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