交易数据处理方案
# 交易数据处理方案
# requestId 方案
requestId 是标记本次请求的标识,应该全局唯一,最好应该是单调递增的。这里推荐使用以下方案:
使用系统中用户的关键数据进行拼合,生成新的唯一标识。
使用雪花算法。
# v2/checkout 请求
- checkout 接口请求应当留存请求记录和参数记录,以便于排查问题。
# notify 响应数据
notify 通知的参数也应当留存,以便于排查问题。
以下是notify log建表示例
create table ping_pong_payment_log
(
id bigint auto_increment comment 'ID'
primary key,
order_id bigint
transaction_id varchar(160)
pp_status varchar(30)
description varchar(255)
query_response text
notify_response text
date_add datetime default CURRENT_TIMESTAMP not null,
constraint uq_transaction_id
unique (transaction_id)
comment 'ping_pong_payment_log';
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
上次更新: 2021/11/26, 17:52:31