|
@@ -128,9 +128,9 @@ public class WeixinPayController extends Controller {
|
|
|
// renderText("need appId");
|
|
|
// }
|
|
|
String openid = this.getPara("openid");
|
|
|
-// if (openid == null) {
|
|
|
-// renderText("need openid");
|
|
|
-// }
|
|
|
+ if (openid == null) {
|
|
|
+ renderText("need openid");
|
|
|
+ }
|
|
|
String body = this.getPara("body");
|
|
|
if (body == null) {
|
|
|
renderText("need body");
|
|
@@ -167,9 +167,7 @@ public class WeixinPayController extends Controller {
|
|
|
params.put("trade_type", TradeType.JSAPI.name());
|
|
|
params.put("nonce_str", System.currentTimeMillis() / 1000 + "");
|
|
|
params.put("notify_url", notify_url);
|
|
|
- if (openid != null) {
|
|
|
- params.put("openid", openid);
|
|
|
- }
|
|
|
+ params.put("openid", openid);
|
|
|
|
|
|
String sign = PaymentKit.createSign(params, paternerKey_jx);
|
|
|
params.put("sign", sign);
|