npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

koishi-plugin-pay-tool

v1.1.1

Published

适用于Koishi框架的易支付工具插件,支持订单创建、查询、退款、分配等功能

Readme

PayTool - Koishi 易支付插件

npm version License: MIT

一个适用于Koishi框架的易支付工具插件,支持订单创建、查询、退款、分配等功能,集成微信支付和支付宝支付。

功能特性

  • ✅ 支付订单创建
  • ✅ 订单状态查询
  • ✅ 订单退款处理
  • ✅ 订单分配功能
  • ✅ 支付成功回调处理
  • ✅ 多种支付方式支持(支付宝、微信支付、自定义)
  • ✅ 数据库订单记录
  • ✅ 安全的MD5签名验证

配置

在Koishi管理界面中配置以下选项:

插件配置

  • 管理员QQ号: 具有订单查询和退款权限的QQ号
  • 回调路由: 支付回调的路由前缀(默认:/paytool/callback/)
  • 调试模式: 启用详细日志输出,便于问题排查
  • 主动查询模式: 用于无法接收回调通知的环境,自动轮询订单状态
    • 等待时长: 首次查询新订单需要等待的时间(默认:30秒)
    • 轮询间隔: 每次查询订单后的等待时间(默认:30秒)
    • 订单过期时间: 超过此时间将停止主动查询(默认:30分钟)

商户配置

  • 接口地址: 易支付平台的API地址 (如: https://your-epay-domain.com)
  • 商户PID: 易支付商户唯一标识
  • 商户密钥: 易支付商户密钥
  • 商品名称: 订单中显示的商品名称(默认:金币)
  • 支付方式配置: 自定义支付方式和显示名称(如:alipay -> 支付宝)
  • 默认支付方式: 创建订单时的默认支付方式代码(如:wxpay)
  • 回调通知地址: 完整的回调通知URL(默认:https://koishi.local/paytool/callback/)
  • 跳转地址: 交易完成后浏览器跳转地址(可选,留空则不跳转)

使用说明

所有指令均需要管理员权限。

创建支付订单

pay.create <金额> [支付方式]

查询订单

pay.query <订单号>      # 查询指定订单
pay.query @用户         # 查询用户所有订单  

申请退款

pay.refund <订单号>

分配订单

pay.provisioning <订单号> @用户

高级功能

  • 自动回调处理: 支付成功后自动更新订单状态
  • 主动查询模式: 可配置自动轮询订单状态
  • 订单归属: 支持将订单分配给指定用户
  • 安全验证: MD5签名验证,管理员权限控制

开发说明

贡献代码

如果您想为本项目贡献代码,请查看 贡献指南 了解:

项目使用 semantic-release 进行自动版本管理和发布。

许可证

MIT License