知识卡片

支付系统案例卡 · 3457

付款失败回退库存

理解等级:中级

对 [[付款失败后库存仍占用]],已提前更新库存时,支付失败后应撤回这次库存变化,使可用量回到未成交状态。原文只提出回退要求,没有给出跨服务回退协议、重试或幂等细节;实际设计还需单独解决这些失败路径。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Microservice APIs》第 1 章《What are microservice APIs?》(源文件:_epub-src/OEBPS/Text/01.htm) - 结论依据:1.3.4 节直接要求若支付在库存更新后失败,应 rollback 此次更新;本卡仅保留这个原则,不推断具体实现机制。 - 原始内容:We may want to update the availability of the ingredients at the time of making the order, and if payment fails later on, we want to make sure we rollback the update.