# dedemao/weixinPay

微信支付单文件版。一个PHP文件搞定微信支付系列。包括原生支付（扫码支付），H5支付，公众号支付，现金红包、企业付款到零钱等。新增V3版。

Repository: https://github.com/dedemao/weixinPay
Canonical: https://ross.abutalabs.com/products/weixinpay
Homepage: https://www.dedemao.com/wx/demo.html
Language: PHP
License: MIT
License Family: permissive
Last push: 2025-08-14T06:05:26+00:00

## Health v2 (maintenance only)
Score: 48/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 36, release rhythm 35, longevity 100
- inputs: {"age_days": 3211, "days_push": 384, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1269, forks 608 (observed 2026-08-28T04:04:11.746918+00:00)

## What it is
A single-file PHP integration for WeChat Pay covering native QR payments, H5 payments, JSAPI (official account) payments, cash red packets, transfers, and refunds, with a V3 API version. Each payment method is a standalone ~200-line file with no external dependencies, requiring only PHP with CURL and SSL enabled.

## Use cases
- accept WeChat QR code payments on a PHP site
- integrate WeChat H5 mobile payments
- add WeChat JSAPI payments inside the official account browser
- send cash red packets to users via WeChat Pay
- process WeChat Pay refunds and async payment notifications
- quickly prototype WeChat Pay without complex SDK setup

## When to choose
- you need a minimal, dependency-free WeChat Pay integration in PHP
- you only need one or two specific WeChat Pay methods
- you want readable example code to learn the WeChat Pay API flow

## When to avoid
- you need a full-featured, maintained payment SDK with framework integration
- your stack is not PHP
- you require comprehensive test coverage and long-term vendor support

## Facets
- artifact type: library
- maturity: active
- function: sdk, http-client, developer-tools
- domain: fintech, web-development, e-commerce, apis
- platform: php, cross-platform
- tags: wechat-pay, payment-integration, single-file, php, scan-pay, h5-pay, red-packet, refund, web-server

## Member repositories
- dedemao/weixinPay (main) score 48

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:11.746918+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:03:31.119743+00:00, confidence not recorded.
  - readme: https://github.com/dedemao/weixinPay (fetched 2026-08-28T04:04:11.746918+00:00, sha 27dfe3aeaca1)
  - homepage: https://www.dedemao.com/wx/demo.html (fetched 2026-08-29T12:14:57.935839+00:00, sha c688244463ef)
- Data as of 2026-08-30T08:39:29.467469+00:00.
