扣款成功时订单完成
This commit is contained in:
@@ -116,6 +116,8 @@ public class PaypalController {
|
||||
//插入花生币充值记录
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,payPaypalOrder.getId());
|
||||
}
|
||||
buyOrder.setOrderStatus("3");
|
||||
buyOrderService.updateById(buyOrder);
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
@@ -148,7 +150,6 @@ public class PaypalController {
|
||||
String res = paypalConfig.receiveVerify(str);
|
||||
if ("VERIFIED".equals(res)){
|
||||
log.info(">>>>>>>>>>>palypal回调校验通过,返回的信息是 result = {}", str);
|
||||
String paymentStatus = request.getParameter("payment_status");
|
||||
//扣款id
|
||||
String txnId = request.getParameter("txn_id");
|
||||
PayPaypalOrder payPaypalOrder = payPaypalOrderService.getOne(new LambdaQueryWrapper<PayPaypalOrder>()
|
||||
@@ -160,13 +161,6 @@ public class PaypalController {
|
||||
payPaypalOrder.setMcGross(request.getParameter("mc_gross")); // 交易金额
|
||||
payPaypalOrder.setCallbackData(str);
|
||||
payPaypalOrderService.updateById(payPaypalOrder);
|
||||
BuyOrder buyOrder = buyOrderService.getById(payPaypalOrder.getOrderId());
|
||||
if (paymentStatus.equalsIgnoreCase("Completed")) {// 订单交易成功
|
||||
buyOrder.setOrderStatus("3");
|
||||
} else {
|
||||
buyOrder.setOrderStatus("2");
|
||||
}
|
||||
buyOrderService.updateById(buyOrder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user