English
Mock Channel: Reconciliation and Test Data
The hard part of reconciliation integration is not matching, it is creating differences. This page explains the three difference rules; with order placement, one pass covers all three exception branches of platform reconciliation.
Where the Page Is
Console "Mock Control → Reconciliation Data". The page has two blocks: difference switches and test-data orders on top, bill file preview below.
Three Difference Rules
All three switches are on by default and changes persist. Two take effect by order amount last digit, the third is independent:
| Switch | Trigger | Difference created |
|---|---|---|
| Missing order | Order amount last digit 7 | Order exists on the platform but not in the bill file (platform-only) |
| Amount mismatch | Order amount last digit 3 | Bill amount is 1 cent less than the platform |
| Extra order | Switch on (no last-digit rule) | One extra row in the bill file, not on the platform (channel-only) |
To trigger a reconciliation task, first place an order with the matching last digit, then start reconciliation in the main app. If no difference appears, first confirm that the order amount last digit actually matched.
Bill File Preview
The preview shows exactly what a download returns; the column contract is fixed:
text
tradeNo,outTradeNo,amount,status,finishTimeComma-separated, UTF-8, \n line endings, header row first. If platform-side parsing fails, first check whether the gateway or proxy rewrote the separator or encoding.
Recommended Drill Order
- Matched: place an order with last digit 1 or 2; confirm platform and file agree exactly;
- Platform-only: place an order with last digit 7; the platform has it, the file does not;
- Amount mismatch: place an order with last digit 3; 1 cent off;
- Channel-only: turn on the "Extra order" switch and place an order; the file has one extra row;
- After each drill, check in the main app whether the reconciliation result and difference details are classified correctly.
Restore the switches after drilling, otherwise every subsequent integration order carries a difference.
Common Questions
- No difference appears: a switch was turned off, the amount last digit did not match, or the reconciliation task used stale data;
- Bill file is garbled after download: confirm UTF-8 in a text editor; Excel guesses the local encoding when opened directly;
- Want to clear and start over: "System → Runtime Settings → Clear All Data" clears transaction data only and keeps rules and profiles; to reset profiles too, delete the three
data/mock-channel.db*files and restart.