Merge remote-tracking branch 'origin/master'

This commit is contained in:
cnzzs
2017-05-20 19:41:50 +08:00
2 changed files with 5 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ public class AliPayService extends BasePayService {
public boolean verify(Map<String, Object> params) {
if (params.get("sign") == null || params.get("notify_id") == null) {
if (params.get("sign") == null) {
log.debug("支付宝支付异常params" + params);
return false;
}
@@ -379,9 +379,9 @@ public class AliPayService extends BasePayService {
// content.put("biz_content", orderInfo.remove("biz_content"));
//预订单
JSONObject result = getHttpRequestTemplate().postForObject(getReqUrl() + "?" + UriVariables.getMapToParameters(orderInfo), null, JSONObject.class);
JSONObject response = result.getJSONObject("alipay_trade_precreate_response");
JSONObject response = result.getJSONObject("alipay_trade_pay_response");
if ("10000".equals(response.getString("code"))){
return response;
return result;
}
throw new PayErrorException(new PayException(response.getString("code"), response.getString("msg"), result.toJSONString()));
}

View File

@@ -146,13 +146,13 @@ public class WxPayService extends BasePayService {
parameters.put("auth_code", order.getAuthCode());
} else {
parameters.put("notify_url", payConfigStorage.getNotifyUrl());
parameters.put("trade_type", order.getTransactionType().getType());
}
parameters.put("out_trade_no", order.getOutTradeNo());// 订单号
parameters.put("spbill_create_ip", "192.168.1.150");
parameters.put("total_fee", order.getPrice().multiply(new BigDecimal(100)).intValue());// 总金额单位为分
parameters.put("trade_type", order.getTransactionType().getType());
parameters.put("attach", order.getBody());
if (WxTransactionType.NATIVE == order.getTransactionType()) {
parameters.put("product_id", order.getOutTradeNo());