|
@@ -95,7 +95,7 @@ public class AlipayCallBackController {
|
|
|
String orderId = request.getParameter("out_trade_no");
|
|
|
String tradeNo = request.getParameter("trade_no");
|
|
|
String tradeStatus = request.getParameter("trade_status"); // TRADE_SUCCESS
|
|
|
- Integer totalAmount = new BigDecimal(request.getParameter("total_amount")).multiply(new BigDecimal(100)).intValue();
|
|
|
+ int totalAmount = new BigDecimal(request.getParameter("total_amount")).multiply(new BigDecimal(100)).intValue();
|
|
|
String completeDate = request.getParameter("gmt_payment");
|
|
|
logger.info("data: orderId:"+orderId +" tradeNo:"+tradeNo +" totalAmount:"+totalAmount+ "tradeStatus:"+tradeStatus);
|
|
|
|
|
@@ -111,8 +111,8 @@ public class AlipayCallBackController {
|
|
|
responseWrite(response,"true");
|
|
|
}
|
|
|
|
|
|
- if(order.getTransactionAmount() != totalAmount){
|
|
|
- logger.error("回调金额与订单金额不一致");
|
|
|
+ if(order.getTransactionAmount().intValue() != totalAmount){
|
|
|
+ logger.error("回调金额与订单金额不一致。transAmt:" + order.getTransactionAmount().intValue() + ",payAmt:" + totalAmount);
|
|
|
responseWrite(response,"fail");
|
|
|
return;
|
|
|
}
|