|
@@ -23,7 +23,7 @@ public class WeixinPayController extends Controller {
|
|
|
private static String appid = "wx1f3dc2c37dce641b";
|
|
|
private static String partner = "1503643261";
|
|
|
private static String paternerKey = "9759a66938e8411ad5889e2b5b394d94";
|
|
|
- private static String notify_url = "http://wechat.pacsonline.cn/wx_patient/pay/pay_notify";
|
|
|
+ private static String notify_url = "https://wechat.pacsonline.cn/wx_patient/pay/pay_notify";
|
|
|
|
|
|
/**
|
|
|
* 公众号支付js-sdk
|
|
@@ -33,10 +33,10 @@ public class WeixinPayController extends Controller {
|
|
|
if (out_trade_no == null) {
|
|
|
renderText("need out_trade_no");
|
|
|
}
|
|
|
- String appId = this.getPara("appId");
|
|
|
- if (appId == null) {
|
|
|
- renderText("need appId");
|
|
|
- }
|
|
|
+// String appId = this.getPara("appId");
|
|
|
+// if (appId == null) {
|
|
|
+// renderText("need appId");
|
|
|
+// }
|
|
|
String openid = this.getPara("openid");
|
|
|
if (openid == null) {
|
|
|
renderText("need openid");
|
|
@@ -54,12 +54,12 @@ public class WeixinPayController extends Controller {
|
|
|
renderText("need notify_url");
|
|
|
}
|
|
|
|
|
|
- ApiConfigKit.setThreadLocalAppId(appId);
|
|
|
+ ApiConfigKit.setThreadLocalAppId(appid);
|
|
|
|
|
|
// 统一下单文档地址:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1
|
|
|
|
|
|
Map<String, String> params = new HashMap<String, String>();
|
|
|
- params.put("appid", appId);
|
|
|
+ params.put("appid", appid);
|
|
|
params.put("mch_id", partner);
|
|
|
params.put("body", body);
|
|
|
params.put("out_trade_no", out_trade_no);
|
|
@@ -102,7 +102,7 @@ public class WeixinPayController extends Controller {
|
|
|
String prepay_id = result.get("prepay_id");
|
|
|
|
|
|
Map<String, String> packageParams = new HashMap<String, String>();
|
|
|
- packageParams.put("appId", appId);
|
|
|
+ packageParams.put("appId", appid);
|
|
|
packageParams.put("timeStamp", System.currentTimeMillis() / 1000 + "");
|
|
|
packageParams.put("nonceStr", System.currentTimeMillis() + "");
|
|
|
packageParams.put("package", "prepay_id=" + prepay_id);
|