|
@@ -291,7 +291,7 @@ public class WxController extends BaseController {
|
|
|
if (JSONObject.parseObject(bodyAsString).get("prepay_id") == null){
|
|
|
throw new CustomException(JSONObject.parseObject(bodyAsString).get("message").toString());
|
|
|
}
|
|
|
- return getWxParamJson(bodyAsString);
|
|
|
+ return getWxParamJson(bodyAsString,xcxAppId);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -362,7 +362,7 @@ public class WxController extends BaseController {
|
|
|
if (JSONObject.parseObject(bodyAsString).get("prepay_id") == null){
|
|
|
throw new CustomException(JSONObject.parseObject(bodyAsString).get("message").toString());
|
|
|
}
|
|
|
- return getWxParamJson(bodyAsString);
|
|
|
+ return getWxParamJson(bodyAsString, gzhAppId);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -374,7 +374,7 @@ public class WxController extends BaseController {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- private JSONObject getWxParamJson(String bodyAsString) throws Exception {
|
|
|
+ private JSONObject getWxParamJson(String bodyAsString,String appId) throws Exception {
|
|
|
String packageStr = "prepay_id="+JSONObject.parseObject(bodyAsString).get("prepay_id");
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("package",packageStr);
|
|
@@ -384,7 +384,7 @@ public class WxController extends BaseController {
|
|
|
jsonObject.put("timeStamp",String.valueOf(timestamp));
|
|
|
jsonObject.put("signType","RSA");
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
- sb.append(xcxAppId + "\n");
|
|
|
+ sb.append(appId + "\n");
|
|
|
sb.append(timestamp + "\n");
|
|
|
sb.append(nonce_str + "\n");
|
|
|
sb.append(packageStr+ "\n");
|