Skip to content

创建 Refund 对象,怎么不能传商户自己的退款单号? #36

@zbz0425

Description

@zbz0425

如果创建 Refund 对象超时,并不幂等,只能根据Charge分页查询获取最新的Refund对象,但是是部分退款,获取到了最新的Refund对象,还只能通过金额去判断大概是不是这个Refund对象。如果差不多先后时间,有其他业务操作也是创建了相同金额的Refund对象。
那么有可能就会存在误判,认为这个Refund对象是之前超时请求创建的。

本来先后有两个业务都退了5块钱,其中一个超时网络异常,实际并没有请求成功,但是查询了一次发现其他业务创建的Refund对象,则会存在误认为自己退款成功

B-----> Create Refund对象, 退款5元,创建成功。
B-----> Create Refund对象, 退款5元,创建失败,因为网络超时,实际ping++并没有收到请求,
这边流程会根据Charge对象去查询Refund对象列表,发现刚才已经创建成功了一个Refund对象 也是退款5元,因为没有其他信息只能根据金额。
不然描述description字段保存退款单号。。。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions