Rainbow E-Pay System (彩虹易支付系统)
repository·main·Indexed 19 days ago
https://github.com/maajiko/epayAn open-source payment gateway aggregator developed by Zhengzhou Zhuimeng Network Technology Co., Ltd. It provides a unified API and management backend to integrate multiple payment channels including Alipay, WeChat Pay, Tenpay, QQ Wallet, and UnionPay. Key features include RSA verification, risk control, plugin extensibility (such as Bepusdt for USDT TRC20), and an admin dashboard for real-time financial statistics and profit analysis.
What's inside Rainbow E-Pay System
- 彩虹易支付系统 (Rainbow E-Pay System) is an open-source, no-contract payment product developed by Zhengzhou Zhuimeng Network Technology Co., Ltd. It provides a one-stop integration for developers to connect multiple payment methods including Alipay, WeChat Pay, Tenpay, and QQ Wallet, enabling efficient payment integration.
Key Features of 彩虹易支付系统
mainThe system offers several core capabilities for payment management:
- Multi-channel Payment Integration: Supports Alipay, WeChat Pay, Tenpay, QQ Wallet, WeChat WAP, UnionPay, and more.
- Simplified Payment Solutions: Provides complete APIs to simplify the integration and deployment process.
- Backend Management & Analytics: Includes tools for payment statistics, agency payment (代付) statistics, and profit analysis.
- Security: Utilizes RSA public/private key verification, risk control detection, and blacklist management.
- Plugin Extensibility: Supports a wide range of payment plugins for flexible expansion.
- Mobile Optimization: Features a new mobile-optimized payment page for various mobile scenarios.
Admin Dashboard Overview and Metrics
mainThe dashboard provides a high-level overview of the system's health and financial performance through several key metrics:
- Order Statistics: Total order count and today's success rate.
- Merchant Statistics: Total number of registered merchants.
- Financial Totals: Total system balance and total settlement amounts.
- Income Breakdown: Tables showing income by Payment Method (e.g., Alipay, WeChat) and Payment Channel.
- Profitability: A specific view for Payment Method Profit, which shows earnings after deducting channel costs.
Note: Financial statistics (Balance, Settlement, and Income tables) are updated approximately every 1 hour.
Access the payment template entrypoint
mainThe
template/index2/index.phpfile serves as a public-facing landing page template for the Rainbow Easy Pay system. It is a PHP-based entrypoint that renders the site's homepage, including navigation, service descriptions, and FAQ sections.Security Note: This file requires the constant
IN_CRONLITEto be defined. If accessed directly without the proper environment context, the script will exit immediately to prevent unauthorized execution.Key Features Rendered:
- Navigation: Links to User Registration (
/user/reg.php), Login (/user/), Documentation (/doc.html), and Payment Testing (/user/test.php) if enabled. - FAQ System: An interactive help section that toggles visibility of answers via JavaScript.
- Dynamic Content: Uses a
$confconfiguration array to populate site metadata (title, keywords, description, sitename, etc.).
<?php if(!defined('IN_CRONLITE'))exit(); ?> <!-- HTML Content follows -->- Navigation: Links to User Registration (
Access configuration variables in payment templates
mainWhen developing or customizing payment templates in the
epaysystem, you can access global configuration settings via the$confassociative array. These variables are injected into the template scope and allow you to dynamically display site-specific information.Commonly used keys in
$confinclude:sitename: The name of the payment platform.title: The HTML<title>of the page.keywords: Meta keywords for SEO.description: Meta description for SEO.settle_rate: The settlement fee rate (e.g.,0.03for 3%).settle_money: The minimum amount required for automatic settlement.settle_fee_min: The minimum withdrawal/settlement fee.settle_fee_max: The maximum withdrawal/settlement fee.kfqq: The Customer Service QQ number used for contact links.test_open: A boolean flag to determine if the online testing link (/user/test.php) should be visible.footer: Custom footer text.
Additionally, the following global constants are available for path resolution:
STATIC_ROOT: The base path for local static assets (CSS, JS, Images).cdnpublic: The base URL for assets served via a CDN.IN_CRONLITE: A security constant. If this is not defined, the script will exit immediately to prevent direct access.
<!-- Example of using configuration variables in a template --> <title><?php echo $conf['title']?></title> <p>Settlement rate is as low as <?php echo $conf['settle_rate']; ?>%!</p> <a href="https://wpa.qq.com/msgrd?v=3&uin=<?php echo $conf['kfqq']?>&site=pay">Contact Support</a>Security Requirement for Template Files
mainTo prevent direct access to template files via a web browser, all template entrypoint files must check for the definition of the
IN_CRONLITEconstant. If this constant is not defined, the script will exit immediately.This ensures that templates are only rendered through the system's core controller/routing mechanism.
<?php if(!defined('IN_CRONLITE'))exit(); ?>Security requirement for template execution
mainTo prevent direct unauthorized access to template files, the system checks for a specific constant. If this constant is not defined, the script will terminate immediately.
if(!defined('IN_CRONLITE'))exit();Ensure that your entrypoint or controller defines
IN_CRONLITEbefore including template files.View Settlement Statistics Chart
mainThe dashboard provides a visual representation of settlement amounts using a spline chart (likely via
ui-jqor a similar plugin integration).Data Source: The chart data is generated server-side from the
pre_settletable, selecting the last 9 settlement records for the current user.Chart Configuration:
- Data Format: An array of coordinates
[index, money]. - Visuals: Uses splines with a tension of 0.4 and a fill opacity of 0.8.
- Y-Axis: Scaled to
max_settle + 10to ensure visibility.
- Data Format: An array of coordinates
API Catalog Structure
mainThe documentation is organized into several functional modules. Developers can navigate to specific implementation details for each:
- Interface Specifications (接口说明): General protocol rules and upgrade notes.
- Signature Rules (签名规则): Detailed logic for generating RSA signatures.
- Payment Methods (支付方式列表): List of supported payment channels.
- Payment Related Interfaces (支付相关接口):
- Page Jump Payment (页面跳转支付)
- Unified Order Creation (统一下单接口)
- Order Query (订单查询)
- Payment Result Notification (支付结果通知)
- Order Refund (订单退款)
- Refund Query (订单退款查询)
- Close Order (关闭订单)
- Merchant Related Interfaces (商户相关接口):
- Query Merchant Info (查询商户信息)
- Query Order List (查询订单列表)
- Transfer Related Interfaces (代付相关接口):
- Initiate Transfer (转账发起)
- Transfer Query (转账查询)
- Query Available Balance (可用余额查询)
- SDK Downloads (SDK下载)
Access configuration variables in templates
mainWhen developing or customizing templates for the Rainbow E-pay system, you can access global configuration settings via the
$confassociative array and system information via superglobals.Commonly used keys in
$confinclude:$conf['title']: The page title.$conf['keywords']: SEO keywords.$conf['description']: SEO description.$conf['sitename']: The name of the payment platform.$conf['test_open']: Boolean flag to determine if the online testing link (/user/test.php) should be visible.$conf['email']: Contact email.$conf['kfqq']: Customer service QQ number.$conf['hzlink1'],$conf['hzlink2']: Partner website links.$conf['hzhb1'],$conf['hzhb2']: Partner website names.$conf['footer']: Footer copyright or text.
Other available variables:
$cdnpublic: Path to the CDN-hosted public assets.$STATIC_ROOT: Path to the local static assets directory.$_SERVER['HTTP_HOST']: The current domain name.$_SERVER['HTTP_HOST']: The current domain name.
Template security requirement
mainTo prevent direct access to template files and ensure they are only rendered through the system's controlled lifecycle, all template files must define the
IN_CRONLITEconstant. If this constant is not defined, the script will exit immediately.<?php if(!defined('IN_CRONLITE'))exit(); ?>Homepage Redirection Configurations
mainWhen the
modis set toindex, the application behavior is governed by the$conf['homepage']setting:- Value
1: Redirects the user immediately to the/user/directory via JavaScript. - Value
2: Loads the URL specified in$conf['homepage_url']within an HTML<frameset>.
- Value