|
|
|
@@ -24,7 +24,8 @@ import org.apache.log4j.Logger; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import com.simple.common.IdWorker; |
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
@Service |
|
|
|
@@ -138,6 +139,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public ResultData createSharingOrder(WxPayOrder wxPayOrder) { |
|
|
|
final IdWorker idworker = IdWorker.get(); |
|
|
|
|
|
|
|
@@ -236,6 +238,8 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
|
|
|
|
if (!WxPayment.verifyNotifyHMAC(returnMap,payAccount.getApiKey())){ |
|
|
|
record.setErrorMsg("返回值校验失败"); |
|
|
|
record.setUpdateTime(new Date()); |
|
|
|
wxProfitSharingOrderMapper.updateByPrimaryKey(record); |
|
|
|
return new ResultData(ErrorCode.PROFIT_SHARING_RETURN_INVALID.getCode(), ErrorCode.PROFIT_SHARING_RETURN_INVALID.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -292,7 +296,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
return new ResultData(ErrorCode.PROFIT_SHARING_QUERY_REQUEST_FAILED.getCode(), returnMap.get("return_msg")); |
|
|
|
} |
|
|
|
|
|
|
|
if (!WxPayment.verifyNotify(returnMap,payAccount.getApiKey())){ |
|
|
|
if (!WxPayment.verifyNotifyHMAC(returnMap,payAccount.getApiKey())){ |
|
|
|
return new ResultData(ErrorCode.PROFIT_SHARING_QUERY_RETURN_INVALID.getCode(), ErrorCode.PROFIT_SHARING_RETURN_INVALID.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
|