Download the PHP package qinii/wechat-mini-program without Composer

On this page you can find all versions of the php package qinii/wechat-mini-program. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wechat-mini-program

Qinii WeChat Mini Program

基于 EasyWeChat 6 的微信小程序扩展包,提供 CRMEB 当前实际使用的小程序登录、小程序码、订阅消息、内容安全、交易发货和直播能力,并复用 qinii/wechat-core 的多账号配置与 HTTP 客户端。

环境要求

安装

配置

配置按账号组组织,小程序配置固定放在 mini_program 节点。secret、appsecret 和 app_secret 均可使用,内部统一转换为 EasyWeChat 所需的 secret。

使用依赖注入时,可以直接注入 Core 的 ConfigResolver:

公共能力

Swoole 环境可以直接注入 wechat-core 提供的客户端:

扩展包每次调用都会创建新的 EasyWeChat 应用,避免 Swoole 常驻进程中的账号和请求状态互相污染。

登录和手机号

decryptData() 用于兼容仍在使用旧版加密数据的业务;新接入手机号能力建议使用 getPhoneNumber()。

小程序码和 URL Link

临时素材和内容安全

订阅消息

扩展包只负责微信模板的查询、选用、删除和发送,不绑定项目数据库。CRMEB 的模板自动同步流程应读取自身模板配置,再调用 getTemplates()、addTemplate() 和 deleteTemplate() 完成编排。

交易发货

商户号是发货请求中的业务参数,不从支付扩展包读取。普通商户传下单商户号,服务商场景按微信文档传实际下单商户号。

复杂发货、合单发货和查询直接传递微信原始参数:

小程序直播

直播能力包含直播间管理、商品管理、成员管理和长期订阅。创建直播间使用的图片应先通过临时素材接口上传。

直播商品、助手、角色、功能开关和长期订阅等完整方法见 功能清单。

扩展接口

交易发货和直播模块提供 raw(),可在微信增加新接口而扩展包尚未升级时直接调用:

其他未封装能力可以通过 application() 获取 EasyWeChat 应用继续调用。

CRMEB 常用方法迁移

旧方法 新调用方式
MiniProgram::getUserInfo() $miniProgram->auth()->codeToSession()
MiniProgram::decryptData() $miniProgram->auth()->decryptData()
MiniProgram::appCodeUnlimit() $miniProgram->qrCode()->unlimited()
MiniProgram::temporaryUpload() $miniProgram->media()->uploadImage()
MiniProgram::msgSecCheck() $miniProgram->contentSecurity()->checkText() 或 checkMedia()
MiniProgram::sendSubscribeTemlate() $miniProgram->subscribe()->send()
MiniProgram::shippingByTradeNo() $miniProgram->shipping()->uploadByOutTradeNo()
MiniProgram::createLiveRoom() $miniProgram->live()->createRoom()

测试

开发仓库中也可以复用已有项目的 Composer autoload:

功能范围

完整方法列表和暂未实现能力见 功能清单。


All versions of wechat-mini-program with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
psr/simple-cache Version ^1.0 || ^2.0 || ^3.0
qinii/wechat-core Version ^1.0.0
symfony/http-client-contracts Version ^3.0
w7corp/easywechat Version ^6.19.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package qinii/wechat-mini-program contains the following files

Loading the files please wait ...