Skip to content

Commit

Permalink
完善微信支付工具
Browse files Browse the repository at this point in the history
  • Loading branch information
秋逸 committed Apr 19, 2017
1 parent 784520a commit 7bb6d22
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ public void onSuccess(String s, Call call, Response response) {
} catch (ParserConfigurationException | IOException | SAXException e) {
e.printStackTrace();
}

SortedMap<String, String> sort = new TreeMap<String, String>(mapXml);

String time = getCurrTime();

SortedMap<String, String> params = new TreeMap<String, String>();
Expand Down Expand Up @@ -121,7 +118,7 @@ public void onError(Call call, Response response, Exception e) {
public static void wechatPayApp(Context mContext, String appid, String mch_id, String wx_private_key, SortedMap<String, String> params, onRequestListener onRxHttp) {
String sign = getSign(params, wx_private_key);

WechatPayModel beanWxPay = new WechatPayModel(appid, mch_id, params.get("prepay_id"), "Sign=WechatPay", "5K8264ILTKCH16CQ2502SI8ZNMTM67VS", params.get("time"), sign);
WechatPayModel beanWxPay = new WechatPayModel(appid, mch_id, params.get("prepayid"), "Sign=WechatPay", "5K8264ILTKCH16CQ2502SI8ZNMTM67VS", params.get("timestamp"), sign);
String pay_param = new Gson().toJson(beanWxPay);
WechatPayTools.doWXPay(mContext, appid, pay_param, onRxHttp);
}
Expand Down

0 comments on commit 7bb6d22

Please sign in to comment.