知识卡片
支付成功后订单状态未更新
订单支付已成功后,若更新订单状态的服务调用失败,支付结果与订单进度就会脱节;若付款失败却继续安排生产,也会造成业务状态错误。根因是支付和后续步骤跨服务执行,单一步骤成功不代表整条业务链完成。此处仅记录问题,原文尚未给出可核验的具体协调方案。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Microservice APIs》第 1 章《What are microservice APIs?》(源文件:_epub-src/OEBPS/Text/01.htm)
- 结论依据:1.3.4 节明确列出支付成功后更新订单状态、安排厨房生产等步骤,并指出不能出现已付款但状态未更新或支付失败仍排产的情况;该段只要求协调结果,未给出具体算法。
- 原始内容:We can’t have an order successfully paid without correctly updating its status, and we shouldn’t schedule its production if payment fails. 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.