|
@@ -77,11 +77,11 @@ public class WxController extends BaseController {
|
|
private IVipUserExamService vipUserExamService;
|
|
private IVipUserExamService vipUserExamService;
|
|
|
|
|
|
|
|
|
|
- @Value("${xcx.appid}")
|
|
|
|
- private String xcxAppid;
|
|
|
|
|
|
+ @Value("${xcx.appId}")
|
|
|
|
+ private String xcxAppId;
|
|
|
|
|
|
- @Value("${app.appid}")
|
|
|
|
- private String appid;
|
|
|
|
|
|
+ @Value("${app.appId}")
|
|
|
|
+ private String appId;
|
|
|
|
|
|
@Value("${wxpay.notifyUrl}")
|
|
@Value("${wxpay.notifyUrl}")
|
|
private String notifyUrl ;
|
|
private String notifyUrl ;
|
|
@@ -129,7 +129,7 @@ public class WxController extends BaseController {
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
ObjectNode rootNode = objectMapper.createObjectNode();
|
|
ObjectNode rootNode = objectMapper.createObjectNode();
|
|
rootNode.put("mchid",wxpayConfig.getMerchantId())
|
|
rootNode.put("mchid",wxpayConfig.getMerchantId())
|
|
- .put("appid", appid)
|
|
|
|
|
|
+ .put("appid", appId)
|
|
.put("description", goodsName)
|
|
.put("description", goodsName)
|
|
.put("notify_url", notifyUrl)
|
|
.put("notify_url", notifyUrl)
|
|
.put("out_trade_no", order.getOutTradeNo());
|
|
.put("out_trade_no", order.getOutTradeNo());
|
|
@@ -154,7 +154,7 @@ public class WxController extends BaseController {
|
|
*/
|
|
*/
|
|
private WxParamEntity getWxAppParamJson(String bodyAsString) throws Exception {
|
|
private WxParamEntity getWxAppParamJson(String bodyAsString) throws Exception {
|
|
WxParamEntity wxParamEntity = new WxParamEntity();
|
|
WxParamEntity wxParamEntity = new WxParamEntity();
|
|
- wxParamEntity.setAppId(appid);
|
|
|
|
|
|
+ wxParamEntity.setAppId(appId);
|
|
wxParamEntity.setPartnerId(wxpayConfig.getMerchantId());
|
|
wxParamEntity.setPartnerId(wxpayConfig.getMerchantId());
|
|
String prepayId = JSONObject.parseObject(bodyAsString).getString("prepay_id");
|
|
String prepayId = JSONObject.parseObject(bodyAsString).getString("prepay_id");
|
|
wxParamEntity.setPrepayId(prepayId);
|
|
wxParamEntity.setPrepayId(prepayId);
|
|
@@ -165,7 +165,7 @@ public class WxController extends BaseController {
|
|
wxParamEntity.setTimeStamp(timestamp);
|
|
wxParamEntity.setTimeStamp(timestamp);
|
|
|
|
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
- sb.append(appid + "\n");
|
|
|
|
|
|
+ sb.append(appId + "\n");
|
|
sb.append(timestamp + "\n");
|
|
sb.append(timestamp + "\n");
|
|
sb.append(nonce_str + "\n");
|
|
sb.append(nonce_str + "\n");
|
|
sb.append(prepayId+ "\n");
|
|
sb.append(prepayId+ "\n");
|
|
@@ -252,7 +252,7 @@ public class WxController extends BaseController {
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
ObjectNode rootNode = objectMapper.createObjectNode();
|
|
ObjectNode rootNode = objectMapper.createObjectNode();
|
|
rootNode.put("mchid",wxpayConfig.getMerchantId())
|
|
rootNode.put("mchid",wxpayConfig.getMerchantId())
|
|
- .put("appid", xcxAppid)
|
|
|
|
|
|
+ .put("appid", xcxAppId)
|
|
.put("description", goodsName)
|
|
.put("description", goodsName)
|
|
.put("notify_url", notifyUrl)
|
|
.put("notify_url", notifyUrl)
|
|
.put("out_trade_no", order.getOutTradeNo());
|
|
.put("out_trade_no", order.getOutTradeNo());
|
|
@@ -287,7 +287,7 @@ public class WxController extends BaseController {
|
|
jsonObject.put("timeStamp",String.valueOf(timestamp));
|
|
jsonObject.put("timeStamp",String.valueOf(timestamp));
|
|
jsonObject.put("signType","RSA");
|
|
jsonObject.put("signType","RSA");
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
- sb.append(xcxAppid + "\n");
|
|
|
|
|
|
+ sb.append(xcxAppId + "\n");
|
|
sb.append(timestamp + "\n");
|
|
sb.append(timestamp + "\n");
|
|
sb.append(nonce_str + "\n");
|
|
sb.append(nonce_str + "\n");
|
|
sb.append(packageStr+ "\n");
|
|
sb.append(packageStr+ "\n");
|
|
@@ -303,7 +303,7 @@ public class WxController extends BaseController {
|
|
byte[] signedData = signature.sign();
|
|
byte[] signedData = signature.sign();
|
|
String base64Str = Base64.getEncoder().encodeToString(signedData);
|
|
String base64Str = Base64.getEncoder().encodeToString(signedData);
|
|
jsonObject.put("paySign",base64Str);
|
|
jsonObject.put("paySign",base64Str);
|
|
- jsonObject.put("appId",appid);
|
|
|
|
|
|
+ jsonObject.put("appId", appId);
|
|
return jsonObject;
|
|
return jsonObject;
|
|
}
|
|
}
|
|
|
|
|