Exrick/xpay
XPay个人免签收款支付系统 完全免费 资金直接到达本人账号 支持 支付宝 微信 QQ 云闪付 无需备案 无需签约 无需挂机监控APP 无需插件 无需第三方支付SDK 无需营业执照身份证 只需收款码 搞定支付流程 现已支持移动端支付
Looks unmaintained — solo project with stale commits
weakest axiscopyleft license (GPL-3.0) — review compatibility; last commit was 2y ago…
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
last commit was 2y ago; no CI workflows detected
- ✓GPL-3.0 licensed
- ⚠Stale — last commit 2y ago
- ⚠Solo or near-solo (1 contributor active in recent commits)
Show all 6 evidence items →Show less
- ⚠GPL-3.0 is copyleft — check downstream compatibility
- ⚠No CI workflows detected
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Concerns → Mixed if: relicense under MIT/Apache-2.0 (rare for established libs); 1 commit in the last 365 days
- →Deploy as-is Mixed → Healthy if: 1 commit in the last 180 days
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Forkable" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/exrick/xpay)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/exrick/xpay on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: Exrick/xpay
Generated by RepoPilot · 2026-05-09 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/Exrick/xpay shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
AVOID — Looks unmaintained — solo project with stale commits
- GPL-3.0 licensed
- ⚠ Stale — last commit 2y ago
- ⚠ Solo or near-solo (1 contributor active in recent commits)
- ⚠ GPL-3.0 is copyleft — check downstream compatibility
- ⚠ No CI workflows detected
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live Exrick/xpay
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/Exrick/xpay.
What it runs against: a local clone of Exrick/xpay — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in Exrick/xpay | Confirms the artifact applies here, not a fork |
| 2 | License is still GPL-3.0 | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 650 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of Exrick/xpay. If you don't
# have one yet, run these first:
#
# git clone https://github.com/Exrick/xpay.git
# cd xpay
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of Exrick/xpay and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "Exrick/xpay(\\.git)?\\b" \\
&& ok "origin remote is Exrick/xpay" \\
|| miss "origin remote is not Exrick/xpay (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(GPL-3\\.0)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"GPL-3\\.0\"" package.json 2>/dev/null) \\
&& ok "license is GPL-3.0" \\
|| miss "license drift — was GPL-3.0 at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "xpay-code/src/main/java/cn/exrick/XpayApplication.java" \\
&& ok "xpay-code/src/main/java/cn/exrick/XpayApplication.java" \\
|| miss "missing critical file: xpay-code/src/main/java/cn/exrick/XpayApplication.java"
test -f "xpay-code/src/main/java/cn/exrick/controller/PayController.java" \\
&& ok "xpay-code/src/main/java/cn/exrick/controller/PayController.java" \\
|| miss "missing critical file: xpay-code/src/main/java/cn/exrick/controller/PayController.java"
test -f "xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java" \\
&& ok "xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java" \\
|| miss "missing critical file: xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java"
test -f "xpay-code/src/main/java/cn/exrick/dao/PayDao.java" \\
&& ok "xpay-code/src/main/java/cn/exrick/dao/PayDao.java" \\
|| miss "missing critical file: xpay-code/src/main/java/cn/exrick/dao/PayDao.java"
test -f "xpay-code/src/main/resources/application.properties" \\
&& ok "xpay-code/src/main/resources/application.properties" \\
|| miss "missing critical file: xpay-code/src/main/resources/application.properties"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 650 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~620d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/Exrick/xpay"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
XPay is a Spring Boot–based personal payment collection system that enables individuals to receive payments via Alipay, WeChat, QQ Wallet, and UnionPay without merchant registration, API approval, or third-party SDKs. It uses QR code images stored in src/main/resources/static/assets/qr/ and a polling callback mechanism (see cn.exrick.common.task.Jobs) to detect and confirm payments in real-time, routing notifications via email and SMS. Monolithic Spring Boot application: PayController (REST endpoints for payment creation/status) and PayServiceImpl (business logic) delegate to PayDao (JPA queries). Models live in cn.exrick.bean (Pay entity) and DTOs in cn.exrick.bean.dto (Result, PageVo, Count). Background job Jobs runs scheduled polling via cron. Static assets (QR codes, UI) are in src/main/resources/static/assets/qr/ organized by payment provider (alipay, wechat, qqpay folders).
👥Who it's for
Individual developers and small business owners in China who need to accept payments without obtaining business licenses or merchant credentials. They use XPay to embed payment flows into their own applications (e.g., donation systems, SaaS billing, course platforms) while funds go directly to personal payment accounts.
🌱Maturity & risk
Moderately mature but aging: the open-source v2.0 is from 2017–2018 (3K+ Java LOC, 344K+ HTML); v3.1 with official Alipay/WeChat callbacks exists but is proprietary/paid. No visible CI/test suite in the repo structure. The codebase is stable enough for small-scale personal use but lacks automated testing and formal deployment practices.
Single-maintainer (Exrick) with no visible test harness or CI pipeline; last public update is years old, and the active v3.1 is behind a paywall, reducing community scrutiny. Core risk: Alipay/WeChat regularly tighten anti-fraud controls, so the free QR-code detection method may face wind control or blocking at any time. Email/SMS dependencies (see cn.exrick.common.utils.EmailUtils) require external service configuration, adding operational surface area.
Active areas of work
The open v2.0 is dormant. The maintainer is selling access to v3.1 (which adds official Alipay/WeChat SDK callbacks, auto-refunds, etc.) via a payment gate at xpay.exrick.cn/pay. No active PRs or issues visible in the public repo; development has moved to a proprietary model.
🚀Get running
git clone https://github.com/Exrick/xpay.git
cd xpay-code
mvn clean install
mvn spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=dev"
Then navigate to http://localhost:8080 and configure your payment QR codes in src/main/resources/static/assets/qr/alipay/, wechat/, qqpay/ directories.
Daily commands:
- Set up MySQL and create a database. 2. Update
src/main/resources/application-dev.propertieswith DB credentials, Redis config, email/SMS keys. 3. Runmvn spring-boot:run -Dspring.profiles.active=dev. 4. Visithttp://localhost:8080/swagger-ui.htmlfor API docs or the web UI athttp://localhost:8080.
🗺️Map of the codebase
xpay-code/src/main/java/cn/exrick/XpayApplication.java— Spring Boot application entry point; defines how the entire payment system initializes and starts.xpay-code/src/main/java/cn/exrick/controller/PayController.java— Primary REST API endpoint handler for all payment operations; routes incoming payment requests to services.xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java— Core business logic for processing payments across Alipay, WeChat, QQ, and UnionPay; orchestrates payment flow.xpay-code/src/main/java/cn/exrick/dao/PayDao.java— Data access layer for persisting and querying payment records; critical for transaction auditing.xpay-code/src/main/resources/application.properties— Configuration hub for all runtime settings including payment channels, database, Redis, and email parameters.xpay-code/pom.xml— Maven dependency management; defines all Spring Boot, database, and payment-related library versions.xpay-code/src/main/java/cn/exrick/common/task/Jobs.java— Scheduled background jobs for payment polling and callback reconciliation; ensures payment confirmation reliability.
🛠️How to make changes
Add a New Payment Channel
- Define channel configuration properties in application.properties (e.g., xpay.channel.newpay.enabled, xpay.channel.newpay.qrcode) (
xpay-code/src/main/resources/application.properties) - Add channel-specific enum value or constant to service logic (
xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java) - Implement channel integration logic (QR generation, redirect URL building) in PayServiceImpl methods (
xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java) - Add channel-specific webhook/callback handling in PayController (
xpay-code/src/main/java/cn/exrick/controller/PayController.java) - Create channel CSS stylesheet for UI styling (
xpay-code/src/main/resources/static/assets/css/newpay.css) - Add polling logic for channel status verification in Jobs.java if needed (
xpay-code/src/main/java/cn/exrick/common/task/Jobs.java)
Add a New REST API Endpoint
- Add public method to PayController with @RequestMapping/@PostMapping/@GetMapping annotation (
xpay-code/src/main/java/cn/exrick/controller/PayController.java) - Create or reuse a service method in PayServiceImpl to handle business logic (
xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java) - If new data structure needed, create DTO in bean/dto package (
xpay-code/src/main/java/cn/exrick/bean/dto/Result.java) - Wrap response using ResultUtil.success() or ResultUtil.error() (
xpay-code/src/main/java/cn/exrick/common/utils/ResultUtil.java) - Swagger annotation will auto-document endpoint via Swagger2Config (
xpay-code/src/main/java/cn/exrick/config/Swagger2Config.java)
Add a Scheduled Background Task
- Create a new method in Jobs.java with @Scheduled annotation specifying cron or fixed delay (
xpay-code/src/main/java/cn/exrick/common/task/Jobs.java) - Inject PayService dependency using @Autowired (
xpay-code/src/main/java/cn/exrick/common/task/Jobs.java) - Query pending payments from PayDao and call service methods for status updates (
xpay-code/src/main/java/cn/exrick/dao/PayDao.java) - Use EmailUtils to send notifications or alerts on task completion (
xpay-code/src/main/java/cn/exrick/common/utils/EmailUtils.java)
Add Caching with Redis
- Verify RedisConfig is properly configured with connection settings from application.properties (
xpay-code/src/main/java/cn/exrick/config/RedisConfig.java) - Inject RedisTemplate into service or DAO class (
xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java) - Use @Cacheable or @CachePut annotations on PayService methods for automatic cache management (
xpay-code/src/main/java/cn/exrick/service/PayService.java) - Configure cache TTL and eviction policies in RedisConfig (
xpay-code/src/main/java/cn/exrick/config/RedisConfig.java)
🪤Traps & gotchas
Email/SMS config: EmailUtils requires SMTP credentials (not in repo; must be set in application.properties). QR code detection: Jobs.java polls for payment status without official APIs—success depends on Alipay/WeChat not blocking the polling URLs, which has happened multiple times historically. Redis dependency: RedisConfig is auto-wired but no fallback if Redis is unavailable; application will fail to start. MySQL schema: No migration files visible; schema must be manually created before startup. Security: PayController has minimal authentication; anyone can create payment orders if deployed publicly without extra middleware. Mobile detection: IpInfoUtils may fail for rate-limiting or IP geolocation errors; no circuit breaker pattern. Java 8 only: Uses spring-boot-starter-redis (deprecated in Spring Boot 2.x), limiting upgrades.
🏗️Architecture
💡Concepts to learn
- Polling/Long-polling callback — XPay uses scheduled polling (Jobs.java) to detect payment status instead of official webhooks, because individual developers cannot register for merchant APIs. Understanding when polling is viable vs. when webhooks are necessary is critical.
- QR code as payment instrument — The system relies on static QR code images (stored in src/main/resources/static/assets/qr/) as the actual payment mechanism, not dynamic API-generated codes. This is a low-tech but fragile approach vulnerable to provider changes.
- Payment status state machine — The Pay entity must track states (pending, confirmed, expired, refunded) and transitions; understanding how PayServiceImpl manages these transitions is essential for modifying payment logic.
- Out-of-band notification (email/SMS) — XPay notifies users of payment status via email and SMS rather than in-app push; this requires external service configuration and adds operational dependencies.
- Data access object (DAO) pattern — PayDao (JPA repository) abstracts database queries; understanding Spring Data JPA method naming conventions is needed to extend payment queries.
- Scheduled background tasks — Jobs.java uses @Scheduled cron to run periodic polling; this is the heartbeat of the free callback system and a critical operational component.
- Session affinity and distributed payment state — If scaled horizontally, Redis caching (RedisConfig) becomes critical to ensure payment state consistency across instances; currently single-instance design.
🔗Related repos
Exrick/xmall— Full-stack e-commerce demo that integrates XPay for checkout; shows production usage patterns for payment integration.PaysApi/PayApiDoc— Alternative aggregated payment API for Chinese payment providers; different approach (app-based) to the QR-code-polling mechanism used by XPay.tomoya92/pay-core— Spring Boot library for Alipay and WeChat SDK integration; represents the official (non-free) callback approach that XPay avoids.micro-pay/pay-sdk— Lightweight Alipay/WeChat SDKs in pure Java; useful for understanding payment flow patterns if XPay's free method becomes unavailable.shopxo/shopxo— Open-source Chinese shop system with built-in payment integrations (Alipay, WeChat); larger ecosystem example of personal/small-business payment needs in China.
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add unit tests for PayService and PayServiceImpl classes
The repo lacks test coverage for core business logic. PayServiceImpl handles critical payment processing and data persistence operations. Adding comprehensive unit tests for src/main/java/cn/exrick/service/impl/PayServiceImpl.java and src/main/java/cn/exrick/service/PayService.java would ensure payment transactions are reliable and catch regressions when features are modified.
- [ ] Create src/test/java/cn/exrick/service/impl/PayServiceImplTest.java with tests for payment creation, status updates, and transaction queries
- [ ] Create src/test/java/cn/exrick/service/PayServiceTest.java with interface contract tests
- [ ] Mock PayDao and external dependencies (EmailUtils, Redis) using Mockito
- [ ] Add test cases for edge cases like duplicate payments, invalid amounts, and concurrent requests
- [ ] Update pom.xml to include junit, mockito, and spring-boot-starter-test dependencies
Add integration tests and GitHub Actions CI workflow for Java/Maven builds
The repo has no CI/CD pipeline. Given the payment system nature, automated testing before merge is critical. A GitHub Actions workflow would catch build failures, test failures, and security issues early. Integration tests would validate the full Spring Boot application stack including database and Redis interactions.
- [ ] Create .github/workflows/maven-build.yml with steps to compile, run unit tests, and run integration tests on push/PR
- [ ] Create src/test/java/cn/exrick/controller/PayControllerIntegrationTest.java to test HTTP endpoints with MockMvc
- [ ] Add tests for PayController.java endpoints (payment creation, status queries) with real database and Redis
- [ ] Configure application-test.properties for integration test environment (H2 in-memory DB instead of MySQL)
- [ ] Add Maven failsafe plugin configuration to pom.xml for integration test execution
Add input validation and error handling documentation in PayController and add missing validation tests
PayController.java lacks documented validation rules and comprehensive error handling for payment requests. The current codebase has no visible input sanitization for payment amounts, URLs, or user IDs. Adding JSR-303 Bean Validation annotations and documenting expected error responses would improve security and API usability for integrators.
- [ ] Add javax.validation annotations (@NotNull, @Min, @Pattern, etc.) to Pay.java bean for fields like amount, payUrl, and notifyUrl
- [ ] Create src/test/java/cn/exrick/controller/PayControllerValidationTest.java with tests for invalid inputs (negative amounts, malformed URLs, missing required fields)
- [ ] Update PayController.java to add @Valid annotation on request parameters and implement @ExceptionHandler methods for MethodArgumentNotValidException
- [ ] Document expected HTTP error responses (400, 422) in Swagger2Config.java or inline controller Javadoc
- [ ] Add pom.xml dependency for spring-boot-starter-validation if not present
🌿Good first issues
- Feature: Add unit tests for
PayServiceImpl.handlePayment()andPayServiceImpl.checkPaymentCallback()to verify payment status transitions and notification dispatch. Currently, no test directory exists in the repo. - Documentation: Create a
docs/SETUP.mdfile documenting the exact MySQL schema (tables, columns, indexes), Redis config, SMTP/SMS provider setup, and QR code image naming conventions. The README alludes to these but provides no concrete SQL or examples. - Bug/Enhancement: Add error handling and retry logic to
EmailUtils.sendEmail()and implement an SMS utility (template exists in imports but no implementation visible). Emails currently have no fallback if SMTP fails, causing silent payment notification losses. - Security: Implement authentication (JWT or session-based) in
PayControllerendpoints so only authorized users can create/query orders. Currently, no access control is visible, allowing anyone to spam payment orders.
📝Recent commits
Click to expand
Recent commits
f4392b3— Update README.md (Exrick)a727bbc— Update README.md (Exrick)fc6f5fe— Update README.md (Exrick)a3a198d— Update README.md (Exrick)8f64520— [DEL]删除idea相关文件 (Exrick)5f88695— Update .gitignore (Exrick)1540a2d— Update README.md (Exrick)77ca8fd— Update README.md (Exrick)8e81ccf— Update README.md (Exrick)c99bacb— [UPDATE]更新v2.0 (Exrick)
🔒Security observations
- Critical · Outdated Spring Boot Version with Known Vulnerabilities —
xpay-code/pom.xml (parent dependency). The project uses Spring Boot 1.5.9.RELEASE (released September 2017), which is extremely outdated and contains numerous known security vulnerabilities. This version is no longer maintained and lacks security patches for critical issues including remote code execution, authentication bypasses, and other exploits. Fix: Immediately upgrade to Spring Boot 2.7.x or 3.x (LTS versions). Review and update all dependent libraries to their latest stable versions. Spring Boot 1.5.x reached end-of-life in August 2019. - Critical · Outdated MySQL Connector with Security Flaws —
xpay-code/pom.xml (mysql-connector-java dependency). MySQL Connector Java 5.1.44 (released March 2017) contains multiple security vulnerabilities including XXE (XML External Entity) injection and other known exploits. This version is obsolete. Fix: Upgrade to MySQL Connector Java 8.0.33 or later. Ensure compatibility with your MySQL version. - High · Outdated Druid Connection Pool with Vulnerabilities —
xpay-code/pom.xml (druid dependency). Druid 1.1.4 (released April 2018) is outdated and may contain unpatched security vulnerabilities. Current versions have significant security improvements. Fix: Upgrade Druid to version 1.2.16 or later. Check release notes for security patches. - High · Deprecated Spring Boot Redis Starter —
xpay-code/pom.xml (spring-boot-starter-redis dependency). The project uses 'spring-boot-starter-redis' version 1.4.7.RELEASE, which is deprecated since Spring Boot 1.4. This indicates outdated dependency management and potential security gaps in Redis integration. Fix: Replace with 'spring-boot-starter-data-redis' in a modern Spring Boot version. Ensure Redis is properly secured with authentication and encryption. - High · Missing Security Dependencies —
xpay-code/pom.xml. No Spring Security dependency is present in the pom.xml. A payment system handling financial transactions must include proper authentication, authorization, and CSRF protection mechanisms. Fix: Add spring-boot-starter-security to enforce authentication and authorization. Implement JWT or OAuth2 for API security. Add CSRF token validation for form submissions. - High · No HTTPS Configuration Visible —
xpay-code/src/main/resources/application.properties. The project appears to lack explicit HTTPS/TLS configuration. A payment system must enforce HTTPS to protect sensitive financial data in transit. Fix: Configure server.ssl properties to enforce HTTPS. Use strong TLS 1.2+ with modern cipher suites. Implement HSTS headers. - High · SQL Injection Risk - No Visible Input Validation —
xpay-code/src/main/java/cn/exrick/dao/PayDao.java. The project structure shows PayDao.java but without reviewing implementation details, the use of raw SQL queries combined with the lack of parameterized query visibility suggests potential SQL injection risks, especially given the outdated Spring Boot version. Fix: Use parameterized queries exclusively. Leverage Spring Data JPA with @Query using parameter binding (?1, :paramName). Never concatenate user input into SQL strings. Implement input validation and sanitization. - High · Payment Data Exposure Risk —
xpay-code/src/main/java/cn/exrick/bean/Pay.java. A payment system handling Alipay, WeChat Pay, QQ Pay, and UnionPay transactions requires strict data protection. No evidence of encryption for sensitive payment data (amounts, transaction IDs, user identifiers). Fix: Encrypt sensitive payment fields at rest using AES-256. Use HTTPS for all data in transit. Implement secure key management. Never log sensitive payment data. Follow PCI DSS compliance requirements. - Medium · Missing CORS Configuration —
undefined. No explicit CORS (Cross-Origin Resource Sharing Fix: undefined
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.