├── README.md
├── WebContent
├── WEB-INF
│ ├── lib
│ │ ├── core-3.2.1.jar
│ │ ├── javase-3.2.1.jar
│ │ ├── jaxen-1.1.6.jar
│ │ ├── jdom-1.1.3.jar
│ │ └── log4j-1.2.17.jar
│ └── web.xml
├── index.jsp
└── testpay.jsp
└── src
├── com
└── wqy
│ ├── Notify1.java
│ ├── Pay1.java
│ ├── Re_notify.java
│ └── util
│ ├── HttpUtil.java
│ ├── MD5Util.java
│ ├── PayCommonUtil.java
│ ├── PayConfigUtil.java
│ └── XMLUtil.java
└── log4j.properties
/README.md:
--------------------------------------------------------------------------------
1 | # wpay
2 | 微信扫码支付模式一
3 |
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/core-3.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangqiuyun/wpay/71e060b2d75764fdd5579a4edff50a3010f64a04/WebContent/WEB-INF/lib/core-3.2.1.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/javase-3.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangqiuyun/wpay/71e060b2d75764fdd5579a4edff50a3010f64a04/WebContent/WEB-INF/lib/javase-3.2.1.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/jaxen-1.1.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangqiuyun/wpay/71e060b2d75764fdd5579a4edff50a3010f64a04/WebContent/WEB-INF/lib/jaxen-1.1.6.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/jdom-1.1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangqiuyun/wpay/71e060b2d75764fdd5579a4edff50a3010f64a04/WebContent/WEB-INF/lib/jdom-1.1.3.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/lib/log4j-1.2.17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangqiuyun/wpay/71e060b2d75764fdd5579a4edff50a3010f64a04/WebContent/WEB-INF/lib/log4j-1.2.17.jar
--------------------------------------------------------------------------------
/WebContent/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | wpay
4 |
5 | index.html
6 | index.htm
7 | index.jsp
8 | default.html
9 | default.htm
10 | default.jsp
11 |
12 |
--------------------------------------------------------------------------------
/WebContent/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 |
4 |
5 |
6 |
7 | 支付回调
8 |
9 |
10 | 支付回调模式一
11 |
12 |
--------------------------------------------------------------------------------
/WebContent/testpay.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 |
4 |
5 |
6 |
7 | testpay
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/com/wqy/Notify1.java:
--------------------------------------------------------------------------------
1 | package com.wqy;
2 |
3 | import java.io.BufferedOutputStream;
4 | import java.io.BufferedReader;
5 | import java.io.IOException;
6 | import java.io.InputStream;
7 | import java.io.InputStreamReader;
8 | import java.util.SortedMap;
9 | import java.util.TreeMap;
10 |
11 | import javax.servlet.ServletException;
12 | import javax.servlet.annotation.WebServlet;
13 | import javax.servlet.http.HttpServlet;
14 | import javax.servlet.http.HttpServletRequest;
15 | import javax.servlet.http.HttpServletResponse;
16 |
17 | import org.apache.log4j.Logger;
18 |
19 | import com.wqy.util.HttpUtil;
20 | import com.wqy.util.PayCommonUtil;
21 | import com.wqy.util.PayConfigUtil;
22 |
23 | /**
24 | * Servlet implementation class Notify1
25 | */
26 | @WebServlet("/Notify1")
27 | public class Notify1 extends HttpServlet {
28 | private static final long serialVersionUID = 1L;
29 | private static Logger logger = Logger.getLogger(Notify1.class);
30 |
31 | /**
32 | * @see HttpServlet#HttpServlet()
33 | */
34 | public Notify1() {
35 | super();
36 | // TODO Auto-generated constructor stub
37 | }
38 |
39 | /**
40 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
41 | * response)
42 | */
43 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
44 | throws ServletException, IOException {
45 | // TODO Auto-generated method stub
46 |
47 | // 读取xml
48 | InputStream inputStream;
49 | StringBuffer sb = new StringBuffer();
50 | inputStream = request.getInputStream();
51 | String s;
52 | BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
53 | while ((s = in.readLine()) != null) {
54 | sb.append(s);
55 | }
56 | in.close();
57 | inputStream.close();
58 |
59 | SortedMap