orderInfo) {
+ throw new UnsupportedOperationException();
+ }
+
+
+ /**
+ * 支付结果查询(直接返回)
+ *
+ * 返回结果例子
+ *
+ * 错误代码(0000表示成功 其他失败)错误中文描述商户订单号订单状态(‘00’ – 订单已生成(初始状态) ‘01’ – 订单已撤消 ‘02’ – 订单已合并 ‘03’ – 订单已过期 ‘04’ – 订单已确认(等待支付) ‘05’ – 订单支付失败 ‘11’ – 订单已支付 ‘18’ – 已发货 ‘19’ – 已确认收货)富友流水号保留字段md5
+ *
+ * md5为plain域的内容+商户密钥做md5,不包括plain标签
+ * 以下是MD5的内容
+ * 错误代码(0000表示成功 其他失败)错误中文描述商户订单号订单状态(‘00’ – 订单已生成(初始状态) ‘01’ – 订单已撤消 ‘02’ – 订单已合并 ‘03’ – 订单已过期 ‘04’ – 订单已确认(等待支付) ‘05’ – 订单支付失败 ‘11’ – 订单已支付 ‘18’ – 已发货 ‘19’ – 已确认收货)富友流水号保留字段商户密钥
+ *
+ * @param order_id
+ * @return
+ */
+ public JSONObject vaildatePayResult(String order_id) {
+ LinkedHashMap param = new LinkedHashMap();
+ param.put("mchnt_cd", payConfigStorage.getPartner());
+ param.put("order_id", order_id);
+ param.put("md5", createSign(SignUtils.parameters2MD5Str(param, "|"), payConfigStorage.getInputCharset()));
+ try {
+ String result = execute(new SimplePostRequestExecutor(), fuiouSmpAQueryGate, param);
+ JSONObject object = XML.toJSONObject(result);
+ return object;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+
+}
diff --git a/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/bean/FuiouCurType.java b/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/bean/FuiouCurType.java
new file mode 100644
index 0000000..705a53d
--- /dev/null
+++ b/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/bean/FuiouCurType.java
@@ -0,0 +1,34 @@
+package in.egan.pay.fuiou.bean;/**
+ * Created by Fuzx on 2017/1/24 0024.
+ */
+
+import in.egan.pay.common.bean.CurType;
+
+/**
+ * @author Fuzx
+ * @create 2017 2017/1/24 0024
+ */
+public enum FuiouCurType implements CurType {
+
+ CNY("人民币"),
+ USD("美元"),
+ HKD("港币"),
+ MOP("澳门元"),
+ EUR("欧元"),
+ TWD("新台币"),
+ KRW("韩元"),
+ JPY("日元"),
+ SGD("新加坡元"),
+ AUD("澳大利亚元");
+
+ private String name;
+
+ private FuiouCurType(String name) {
+ this.name = name;
+ }
+ @Override
+ public String getCurType(){
+ return this.name();
+ }
+
+ }
diff --git a/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/bean/FuiouTransactionType.java b/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/bean/FuiouTransactionType.java
new file mode 100644
index 0000000..6234211
--- /dev/null
+++ b/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/bean/FuiouTransactionType.java
@@ -0,0 +1,20 @@
+package in.egan.pay.fuiou.bean;
+
+import in.egan.pay.common.bean.TransactionType;
+
+/**
+ * 微信交易类型
+ * @author egan
+ * @email egzosn@gmail.com
+ * @date 2016/10/19 22:58
+ */
+public enum FuiouTransactionType implements TransactionType {
+ B2B,
+ B2C
+ ;
+
+ @Override
+ public String getType() {
+ return this.name();
+ }
+}
diff --git a/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/utils/SimplePostRequestExecutor.java b/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/utils/SimplePostRequestExecutor.java
new file mode 100644
index 0000000..902025d
--- /dev/null
+++ b/pay-java-fuiou/src/main/java/in/egan/pay/fuiou/utils/SimplePostRequestExecutor.java
@@ -0,0 +1,76 @@
+package in.egan.pay.fuiou.utils;
+
+import com.alibaba.fastjson.JSONObject;
+import in.egan.pay.common.api.RequestExecutor;
+import in.egan.pay.common.bean.result.PayError;
+import in.egan.pay.common.exception.PayErrorException;
+import in.egan.pay.common.util.XML;
+import in.egan.pay.common.util.http.Utf8ResponseHandler;
+import org.apache.http.Consts;
+import org.apache.http.HttpHost;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.message.BasicNameValuePair;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author egan
+ * @email egzosn@gmail.com
+ * @date 2016-5-18 14:09:01
+ */
+public class SimplePostRequestExecutor implements RequestExecutor {
+
+ @Override
+ public String execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, Object postEntity) throws PayErrorException, ClientProtocolException, IOException {
+ HttpPost httpPost = new HttpPost(uri);
+// httpPost.setHeader("Content-Type","application/x-www-from-urlencoded");
+ if (httpProxy != null) {
+ RequestConfig config = RequestConfig.custom().setProxy(httpProxy).build();
+ httpPost.setConfig(config);
+ }
+ if (postEntity instanceof Map) {
+ StringBuilder builder = new StringBuilder();
+ Map pe = (Map) postEntity;
+ for (Object key : pe.keySet()) {
+ builder.append(key).append("=").append(pe.get(key)).append("&");
+ }
+ if (builder.length() > 1) {
+ builder.deleteCharAt(builder.length() - 1);
+ }
+ StringEntity entity = new StringEntity(builder.toString(), Consts.UTF_8);
+// entity.setContentType("application/x-www-from-urlencoded");
+ httpPost.setEntity(entity);
+ } else if (postEntity instanceof String) {
+
+ StringEntity entity = new StringEntity((String) postEntity, Consts.UTF_8);
+ httpPost.setEntity(entity);
+ }else if(postEntity instanceof List){
+ //表单方式
+ httpPost.setEntity(new UrlEncodedFormEntity((List)postEntity, Consts.UTF_8));
+ }
+
+ try (CloseableHttpResponse response = httpclient.execute(httpPost)) {
+ String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response);
+ System.out.println("直接返回的查询结果-->"+responseContent);
+// responseContent = responseContent.replace("","").replace("","").replace("","").replace("","");
+ JSONObject jsonObject = XML.toJSONObject(responseContent);//包含md5
+ JSONObject plain = XML.toJSONObject(""+jsonObject.getString("plain")+"");//"plain" -> "5002验证签名失败"
+
+ if("0000".equals(plain.getString("order_pay_code"))){
+ return "0000";
+ }else{
+ throw new PayErrorException(new PayError(404,plain.getString("order_pay_error"),responseContent));
+ }
+ }finally {
+ httpPost.releaseConnection();
+ }
+ }
+}
\ No newline at end of file