资源简介
关于Java后台调用第三方支付接口(易宝支付接口)实现网上支付功能
代码片段和文件信息
package com.kdyzm.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
//显示支付结果的页面
public class BackServlet extends HttpServlet {
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
this.doPost(request response);
}
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
request.setCharacterEncoding(“utf-8“);
response.setContentType(“text/html;charset=utf-8“);
String r1_Code=request.getParameter(“r1_Code“);
PrintWriter pw=response.getWriter();
if(“1“.equals(r1_Code))
{
String p1_MerId=request.getParameter(“p1_MerId“);
String r3_Amt=request.getParameter(“r3_Amt“);
String r6_Order=request.getParameter(“r6_Order“);
String rp_PayDate=request.getParameter(“rp_PayDate“);
pw.println(“支付成功!
“
+ “商户编号:“+p1_MerId+“
“
+ “支付金额:“+r3_Amt+“
“
+“商户订单号:“+r6_Order+“
“
+“支付成功时间:“+rp_PayDate);
}
else
{
pw.println(“支付失败!“);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 1070 2015-06-22 19:21 day21_2_pay\.classpath
....... 1290 2015-06-22 19:21 day21_2_pay\.project
....... 510 2015-06-22 19:21 day21_2_pay\.settings\.jsdtscope
....... 357 2015-06-22 19:21 day21_2_pay\.settings\org.eclipse.jdt.core.prefs
....... 484 2015-06-22 19:21 day21_2_pay\.settings\org.eclipse.wst.common.component
....... 403 2015-06-22 19:21 day21_2_pay\.settings\org.eclipse.wst.common.project.facet.core.xm
....... 49 2015-06-22 19:21 day21_2_pay\.settings\org.eclipse.wst.jsdt.ui.superType.container
....... 6 2015-06-22 19:21 day21_2_pay\.settings\org.eclipse.wst.jsdt.ui.superType.name
....... 38 2015-06-22 19:21 day21_2_pay\readme.txt
....... 1259 2015-06-22 19:21 day21_2_pay\src\com\kdyzm\servlet\BackServlet.java
....... 1760 2015-06-22 19:21 day21_2_pay\src\com\kdyzm\servlet\PayServlet.java
....... 5345 2015-06-22 19:21 day21_2_pay\src\com\kdyzm\utils\PaymentUtil.java
....... 824 2015-06-22 19:21 day21_2_pay\WebRoot\index.jsp
....... 36 2015-06-22 19:21 day21_2_pay\WebRoot\me
....... 1965 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\classes\com\kdyzm\servlet\BackServlet.class
....... 2751 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\classes\com\kdyzm\servlet\PayServlet.class
....... 4579 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\classes\com\kdyzm\utils\PaymentUtil.class
....... 818 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\web.xm
....... 1096770 2015-06-22 19:21 day21_2_pay\帮助文档及uml文件\易宝支付产品通用接口帮助文档.CHM
....... 47626 2015-06-22 19:21 day21_2_pay\帮助文档及uml文件\易宝支付支付流程.uml
目录 0 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\classes\com\kdyzm\servlet
目录 0 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\classes\com\kdyzm\utils
目录 0 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\classes\com\kdyzm
目录 0 2015-06-22 19:21 day21_2_pay\src\com\kdyzm\servlet
目录 0 2015-06-22 19:21 day21_2_pay\src\com\kdyzm\utils
目录 0 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\classes\com
目录 0 2015-06-22 19:21 day21_2_pay\src\com\kdyzm
目录 0 2015-06-22 19:21 day21_2_pay\WebRoot\WEB-INF\classes
目录 0 2015-06-22 19:21 day21_2_pay\src\com
目录 0 2015-06-22 19:21 day21_2_pay\WebRoot\me
............此处省略9个文件信息
评论
共有 条评论