Stripe webhook charge回调处理
This commit is contained in:
@@ -392,6 +392,10 @@ public class StripeServiceImpl implements StripeService {
|
||||
Charge charge = (Charge) stripeObject;
|
||||
String orderNo = charge.getDescription().replace("AiDA - ", "");
|
||||
OrderInfo orderInfo = orderInfoService.getOrderByOrderNo(orderNo);
|
||||
if (Objects.isNull(orderInfo)){
|
||||
// 说明该回调不是从AiDA订阅获得
|
||||
response = Boolean.TRUE;
|
||||
}
|
||||
if (event.getType().equals("charge.failed")){
|
||||
// 添加支付信息 && 更新支付信息
|
||||
// 支付失败时,无法通过invoice_id获取支付方式,所以使用charge.failed回调添加支付信息
|
||||
|
||||
Reference in New Issue
Block a user