2026-03-20 12:05:54 +08:00
2026-03-20 12:05:54 +08:00
2026-03-20 10:31:13 +08:00
2026-03-20 12:05:54 +08:00
2026-03-20 10:31:13 +08:00
2025-06-27 10:02:46 +08:00
2026-02-24 13:37:35 +08:00
2026-02-23 11:33:27 +08:00
2026-02-27 08:49:38 +00:00
2026-03-10 21:25:02 +08:00
2025-06-27 10:02:46 +08:00
2026-02-27 16:55:18 +08:00
2026-01-23 22:41:17 +08:00
2025-06-27 10:02:46 +08:00
2025-06-27 10:02:46 +08:00

MPay V2 Webman

A payment system backend management API developed based on the Webman framework.

Project Overview

MPay V2 Webman is a payment system backend management API built with the high-performance PHP framework Webman, providing core functionalities such as user authentication, permission management, system configuration, and menu routing.

Technology Stack

  • Backend Framework: Webman
  • PHP Version: PHP 8.0+
  • Database: MySQL
  • Cache: Redis
  • Authentication: JWT

Project Structure

app/
├── command/          # Command-line controllers
├── common/           # Common base classes
│   ├── base/         # Base classes (Controller, Model, Service, Repository)
│   ├── constants/    # Constant definitions
│   ├── enums/        # Enum classes
│   ├── middleware/   # Middleware
│   └── utils/        # Utility classes
├── events/           # Event classes
├── exceptions/       # Exception classes
├── http/             # HTTP controllers
│   └── admin/        # Backend management APIs
│       ├── controller/  # Controllers
│       └── middleware/  # Middleware
├── models/           # Data models
├── process/          # Process management
├── repositories/     # Data repositories
├── services/         # Business services
└── validation/       # Validators
config/               # Configuration files
database/             # Database scripts
doc/                  # Documentation
public/               # Public resources
support/              # Framework support classes

Core Features

Authentication Module

  • User login/logout
  • CAPTCHA generation and verification
  • JWT token authentication
  • User information retrieval

Permission Management

  • Menu and route management
  • User-role association

System Configuration

  • System parameter configuration
  • Dictionary management
  • Form configuration
  • Cache management for configurations

Middleware

  • CORS cross-origin handling
  • Static file handling
  • Authentication and authorization

Quick Start

System Requirements

  • PHP >= 8.0
  • Composer
  • Redis
  • MySQL >= 5.7

Installation Steps

  1. Clone the project
git clone https://gitee.com/technical-laohu/mpay_v2_webman.git
cd mpay_v2_webman
  1. Install dependencies
composer install
  1. Configure the database Edit config/database.php to set up your database connection details.

  2. Configure Redis Edit config/redis.php to set up your Redis connection details.

  3. Import the database

mysql -uusername -p database_name < database/ma_system_config.sql
  1. Start the server
# Linux/Mac
php start.php start

# Windows
windows.bat

API Endpoints

Authentication API

Endpoint Method Description
/admin/auth/captcha GET Get CAPTCHA
/admin/auth/login POST User login

User API

Endpoint Method Description
/admin/user/info GET Get current user information

Menu API

Endpoint Method Description
/admin/menu/routers GET Get menu routes

System API

Endpoint Method Description
/admin/system/dict/{code} GET Get dictionary data
/admin/system/tabs GET Get tab configuration
/admin/system/config/{tabKey} GET/POST Get/submit form configuration

Exception Handling

The project defines the following custom exception classes:

  • BadRequestException - Invalid request parameters (400)
  • UnauthorizedException - Unauthorized access (401)
  • ForbiddenException - Access forbidden (403)
  • NotFoundException - Resource not found (404)
  • ValidationException - Parameter validation failed (422)
  • InternalServerException - Internal server error (500)

Configuration Reference

Main configuration files are located in the config/ directory:

  • app.php - Application configuration
  • database.php - Database configuration
  • redis.php - Redis configuration
  • jwt.php - JWT configuration
  • route.php - Routing configuration
  • middleware.php - Middleware configuration
  • cache.php - Cache configuration
  • log.php - Log configuration

License

This project is open-sourced under the MIT License.

Description
No description provided
Readme MIT 876 KiB
Languages
PHP 100%