English
Mock Channel: Tool Overview and Scope
The Mock Channel is a standalone mock service: it plays the third-party payment platform, receives requests from the DaxPay channel sub-app, returns transaction results such as payments, refunds, and split payments by rule, then pushes asynchronous callbacks back to the address configured on the main app. The chain does not depend on any real channel SDK, account, or certificate, so you can run ordering, callbacks, reconciliation, and refunds on the platform side before the channel account is issued.
Three typical uses:
- Development integration: run new access methods and business scenarios locally, then switch to a real channel;
- Demo POC: show customers the full payment flow without real money;
- Capability testbed: use it as a controllable counterpart to exercise the cashier, callback retry, and reconciliation differences.
Three Concepts Around Mock Channels
"Mock channel" in these docs is not one thing; separate them before reading on:
| Concept | What it is | Provided by |
|---|---|---|
Mock channel products mock_pay / mock_isv | Channel master data and payment products on the platform side; they decide "this order can route to mock" | Main app (imported with the data set) |
| Channel adapter module | The daxpay-channel-mock orchestration module in the main app plus the mock implementation in the channel sub-app; calls the mock service over the channel protocol | Main app, dax-pay-channel-one |
| Mock Channel (this tool) | A standalone service that plays the third-party platform, with a console to decide transaction results, resend callbacks, and create reconciliation differences | Standalone process; the subject of this section |
The call relationship is fixed: main app → channel sub-app → Mock Channel. You do not need to write code for integration; configure the routing, merchant, and callback address on this chain, see Setup.
Demo mode starts it for you
The Ops Panel "Demo Mode" deployment starts the mock channel service in addition to the business containers (the mock component repository in the basic group) and loads the demo data set, so orders work out of the box. For manual deployment and custom scenarios see Setup.
Capability Map
| Capability | Description |
|---|---|
| Payment | 4 payer channels × 9 launch methods, plus aggregate payment (one code, multiple wallets) |
| Refund | Full and partial refunds; WeChat refunds default to processing to exercise asynchronous callbacks |
| Split payment | Query-only transaction, decided by amount last-digit rules, no callback |
| Transfer | Console-only order creation and query; the gateway exposes no transfer endpoint, so the platform never calls it |
| Pre-authorization | Freeze → capture / unfreeze; the console can push a final state and resend callbacks |
| Reconciliation | Create three common difference types and export contract-compliant bill files |
| Onboarding / terminals | ISV merchant onboarding and terminal ledger simulated per the gateway contract |
| WeChat emulation | WeChat authorization page, WeChat payment page, openid validation, and other emulated flows |
| Callback | Automatic callbacks on final states, retry on failure, manual resend; every attempt is logged and searchable |
Five-Minute Shortest Path
- Start the mock service (
mvnd spring-boot:run, default 10400); - In the Admin Panel, create a channel merchant using the "Mock Pay" product; use the built-in seed
MOCKM99999as the channel merchant number or create your own; - Include the channel merchant in channel routing;
- Confirm that "Platform Configuration → Endpoint Configuration" holds a main app address reachable from mock;
- Place an order, open the returned confirmation page, click "Payment Succeeded", and check whether the main app order turns successful and the callback arrives.
Field details and failure symptoms for each step are in Setup.
Scope and Boundaries
Deploy only on a development machine or a trusted intranet
The Mock Channel console offers dangerous operations such as forcing order changes, resending callbacks, and freezing subjects; deploy it only on a development machine or a trusted intranet, and never expose it to the public network. A production main app does not wire the mock orchestration module; with mock routing misconfigured, orders fail with "product strategy does not exist".
The console default account is mock / mock (changeable and switchable off); browser login issues a long-lived cookie, and scripts can use Basic auth directly. Payer-facing standalone pages (payment confirmation, mock payment, payment code) are allowed anonymously, so the demo scan chain is not blocked by a login page.
Continue Reading
- Architecture: who calls whom on this chain, how the protocol surfaces split, and where data lives;
- Setup: one-time configuration and verification on the main app side;
- Console Tour: what the five groups and eighteen views do;
- Transactions and Manual Decisions: how each document type is pushed to a final state.