Commit eac6a976 by chongli

调试完成了微信退款回调

parent 6997db7f
......@@ -166,20 +166,17 @@ public abstract class AbstractNotifyService extends CorePaymentService {
return null;
}
public String weiXinRefoundNotify(String xml) throws Exception{
logger.error(xml);
Map<String,Object> notifyMap = WXUtil.doXMLParse(xml);
if(notifyMap.get("return_code").equals("SUCCESS")){
Map<String,Object> reqInfoMap = WXUtil.doXMLParse(AESUtil.getRefundDecrypt(notifyMap.get("req_info").toString(), Configure.getKey()));
String orderNo = reqInfoMap.get("out_trade_no").toString();//商户订单号
int settlement_refund_fee = (Integer)reqInfoMap.get("settlement_refund_fee");//实际退款金额*100
Order order = this.orderDao.getAndLockOrderByOrderNo(Long.parseLong(orderNo));
BigDecimal bigDecimal = new BigDecimal(settlement_refund_fee);
BigDecimal bigDecimal = new BigDecimal(reqInfoMap.get("settlement_refund_fee").toString());
NotifyRequestBean notifyRequestBean = new NotifyRequestBean();
notifyRequestBean.setAmount(bigDecimal.divide(new BigDecimal("100"),2));
notifyRequestBean.setAmount(bigDecimal.divide(new BigDecimal("100")));
order.setProcessStatus(order.getProcessStatus()
| OrderStatusBitEnum.REFUNDED.getValue());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment