Stripe 回调判空并直接返回

This commit is contained in:
2025-02-28 14:27:36 +08:00
parent f580955c97
commit 79abe93744

View File

@@ -392,9 +392,9 @@ public class StripeServiceImpl implements StripeService {
Charge charge = (Charge) stripeObject;
String orderNo = charge.getDescription().replace("AiDA - ", "");
OrderInfo orderInfo = orderInfoService.getOrderByOrderNo(orderNo);
if (Objects.isNull(orderInfo.getId())){
if (Objects.isNull(orderInfo)){
// 说明该回调不是从AiDA订阅获得
response = Boolean.TRUE;
return true;
}
if (event.getType().equals("charge.failed")){
// 添加支付信息 && 更新支付信息