|
@@ -12,9 +12,9 @@ import utility.wechat.wechatpay.WechatPay;
|
|
|
import java.util.Calendar;
|
|
|
|
|
|
public class WechatMiniProgram extends BaseClass {
|
|
|
- private String appid="";
|
|
|
+ private String appid = "";
|
|
|
private String secret;
|
|
|
- private String mch_id="";
|
|
|
+ private String mch_id = "";
|
|
|
private String mch_key;
|
|
|
private String systemclient;
|
|
|
|
|
@@ -52,6 +52,7 @@ public class WechatMiniProgram extends BaseClass {
|
|
|
public String getMch_key() {
|
|
|
return mch_key;
|
|
|
}
|
|
|
+
|
|
|
public String getAppId() {
|
|
|
return appid;
|
|
|
}
|
|
@@ -100,6 +101,10 @@ public class WechatMiniProgram extends BaseClass {
|
|
|
phone_infoObject.remove("watermark");
|
|
|
return phone_infoObject;
|
|
|
}
|
|
|
+ if (resultObject.containsKey("errcode") && resultObject.getInteger("errcode") == 40001) {
|
|
|
+ access_token_timelimit = 0L;
|
|
|
+ access_token = getAccessToken();
|
|
|
+ }
|
|
|
return resultObject;
|
|
|
}
|
|
|
|
|
@@ -110,7 +115,7 @@ public class WechatMiniProgram extends BaseClass {
|
|
|
* @param custip 客户端IP地址
|
|
|
* @return
|
|
|
*/
|
|
|
- public String createPayOrder(String systemclient,String orderno, String trade_type, String wechat_code, String custip, String title,int order_amount) throws YosException {
|
|
|
+ public String createPayOrder(String systemclient, String orderno, String trade_type, String wechat_code, String custip, String title, int order_amount) throws YosException {
|
|
|
WechatPay wechatPay = new WechatPay(systemclient);
|
|
|
return wechatPay.createPayOrder(orderno, trade_type, getWechatUserID(wechat_code).getOpenid(), custip, title, order_amount);
|
|
|
}
|