对接流程图
flowchart LR
subgraph Phase1["🔧 阶段一:商户接入准备"]
direction TB
A1[📝 申请商户账号<br/>联系PayAll商务团队]
A2[🔑 获取密钥对<br/>RSA2048公钥/私钥]
A3[⚙️ 配置商户信息<br/>source、callback_url]
A1 --> A2 --> A3
end
subgraph Phase2["🔐 阶段二:用户认证"]
direction TB
B1[👤 用户登录<br/>调用 /thirdPartyLogin<br/>使用私钥签名]
B2{Token有效?}
B1 --> B2
B2 -->|无效| B1
end
subgraph Phase3["💳 阶段三:卡片申请"]
direction TB
C1[📋 获取卡片列表<br/>调用 /merchant/cards]
C2[✅ 检查可申请性<br/>调用 /cards/checkCanApply]
C3{可以申请?}
C4[📝 申请卡片<br/>调用 /cards/binding]
C1 --> C2 --> C3
C3 -->|否| C1
C3 -->|是| C4
end
subgraph Phase4["💰 阶段四:开卡/充值"]
direction TB
D1[💵 查询费率<br/>调用 /cards/feeQuote]
D2[📦 预充值<br/>调用 /charge/preCharge<br/>获取 order_id]
D3[📱 获取充值地址<br/>调用 /charge/getChargeQrCode<br/>获取二维码]
D1 --> D2 --> D3
end
subgraph Phase5["🌐 阶段五:用户转账"]
direction TB
E1{选择转账方式}
E2[📷 二维码扫描转账]
E3[🔌 插件钱包转账<br/>上传交易Hash]
E4[⏳ 等待区块链确认]
E1 -->|方式一| E2
E1 -->|方式二| E3
E2 --> E4
E3 --> E4
end
subgraph Phase6["📞 阶段六:回调通知"]
direction TB
F1[📨 PayAll推送回调<br/>POST到 callback_url<br/>携带签名]
F2{验证签名}
F3[✅ 处理业务逻辑<br/>更新订单状态]
F4[❌ 拒绝回调]
F1 --> F2
F2 -->|成功| F3
F2 -->|失败| F4
end
subgraph Phase7["🔍 阶段七:状态查询"]
direction TB
G1[📊 查询订单状态<br/>调用 /getRecordDetail<br/>验证处理结果]
G2[✨ 完成]
G1 --> G2
end
Phase1 --> Phase2
Phase2 --> Phase3
Phase3 --> Phase4
Phase4 --> Phase5
Phase5 --> Phase6
Phase6 --> Phase7
style Phase1 fill:#e3f2fd,stroke:#1976d2,stroke-width:3px
style Phase2 fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px
style Phase3 fill:#e8f5e9,stroke:#388e3c,stroke-width:3px
style Phase4 fill:#fff3e0,stroke:#f57c00,stroke-width:3px
style Phase5 fill:#fce4ec,stroke:#c2185b,stroke-width:3px
style Phase6 fill:#fff9c4,stroke:#f9a825,stroke-width:3px
style Phase7 fill:#e0f2f1,stroke:#00796b,stroke-width:3px
style A1 fill:#bbdefb
style A2 fill:#90caf9
style A3 fill:#64b5f6
style B1 fill:#ce93d8
style B2 fill:#ba68c8
style C1 fill:#a5d6a7
style C2 fill:#81c784
style C3 fill:#66bb6a
style C4 fill:#4caf50
style D1 fill:#ffe0b2
style D2 fill:#ffcc80
style D3 fill:#ffb74d
style E1 fill:#f8bbd0
style E2 fill:#f48fb1
style E3 fill:#f06292
style E4 fill:#ec407a
style F1 fill:#fff59d
style F2 fill:#fff176
style F3 fill:#ffeb3b
style F4 fill:#ffc107
style G1 fill:#b2dfdb
style G2 fill:#80cbc4流程图说明
Last updated