| | |
| | | package org.yeshi.utils.wx;
|
| | |
|
| | | import java.io.InputStream;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.HashMap;
|
| | | import java.util.Map;
|
| | |
| | | String entity = WXUtil.loadWXMessage(map);
|
| | |
|
| | | String result = HttpUtil.post("https://api.mch.weixin.qq.com/pay/unifiedorder", entity);
|
| | | System.out.println("统一下单结果:" + result);
|
| | | try {
|
| | | System.out.println("统一下单结果:" + new String( result.getBytes("GBK"),"UTF-8"));
|
| | | } catch (UnsupportedEncodingException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | Map<String, String> resultMap = WXUtil.parseXML(result);
|
| | |
|
| | | return resultMap;
|