zhifuba-demo.rar

上传者: 46377527 | 上传时间: 2021-01-28 03:53:00 | 文件大小: 8.99MB | 文件类型: RAR
Java使用支付宝接口-demo案例源码架包一起(jsp+servlet) package zhifubao.servletTest; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.alipay.api.AlipayApiException; import zhifubao.service.order.OrderController; /** * @author YXqiang */ @WebServlet(description = "支付宝测试支付功能", urlPatterns = { "/mydo" }) public class zhifubaoServlet extends HttpServlet { private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // TODO Auto-generated method stub doPost(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setCharacterEncoding("utf-8"); //String outTradeNo, String subject, String totalAmount, String body System.out.println(req.getParameter("outTradeNo"));//交易编号 System.out.println(req.getParameter("subject"));//商品 System.out.println(req.getParameter("totalAmount"));//总价 System.out.println(req.getParameter("body"));//商品描述信息 String outTradeNo, subject, totalAmount, body; outTradeNo=req.getParameter("outTradeNo"); subject=req.getParameter("subject"); totalAmount=req.getParameter("totalAmount"); body=req.getParameter("body"); OrderController order=new OrderController(); try { String formestr =order.alipay(outTradeNo, subject, totalAmount, body); req.setAttribute("mycalls", formestr); req.getRequestDispatcher("main.jsp").forward(req, resp); } catch (AlipayApiException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }

文件下载

资源详情

[{"title":"( 33 个子文件 8.99MB ) zhifuba-demo.rar","children":[{"title":"zhifuba-demo","children":[{"title":"WebContent","children":[{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 39B </span>","children":null,"spread":false}],"spread":true},{"title":"WEB-INF","children":[{"title":"lib","children":[{"title":"fastjson-1.2.72.jar <span style='color:#111;'> 637.31KB </span>","children":null,"spread":false},{"title":"alipay-sdk-java-4.10.58.ALL.jar <span style='color:#111;'> 11.76MB </span>","children":null,"spread":false},{"title":"commons-logging-api-1.1.jar <span style='color:#111;'> 43.55KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"main.jsp <span style='color:#111;'> 423B </span>","children":null,"spread":false},{"title":"index.jsp <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"error.jsp <span style='color:#111;'> 372B </span>","children":null,"spread":false},{"title":"sccess.jsp <span style='color:#111;'> 363B </span>","children":null,"spread":false}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.wst.jsdt.ui.superType.name <span style='color:#111;'> 6B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.xml <span style='color:#111;'> 345B </span>","children":null,"spread":false},{"title":"org.eclipse.core.resources.prefs <span style='color:#111;'> 101B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.component <span style='color:#111;'> 555B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 503B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 364B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"zhifubao","children":[{"title":"alipay","children":[{"title":"Alipay.java <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false}],"spread":true},{"title":"pojo","children":[{"title":"AlipayBean.java <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false}],"spread":true},{"title":"servletTest","children":[{"title":"zhifubaoServlet.java <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"AlipayProperties.java <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false},{"title":"order","children":[{"title":"OrderController.java <span style='color:#111;'> 818B </span>","children":null,"spread":false},{"title":"PayServiceImpl.java <span style='color:#111;'> 421B </span>","children":null,"spread":false},{"title":"PayService.java <span style='color:#111;'> 449B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 1.02KB </span>","children":null,"spread":false},{"title":"resource","children":[{"title":"alipay.properties <span style='color:#111;'> 897B </span>","children":null,"spread":false}],"spread":true},{"title":".classpath <span style='color:#111;'> 889B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"classes","children":[{"title":"alipay.properties <span style='color:#111;'> 2.84KB </span>","children":null,"spread":false},{"title":"zhifubao","children":[{"title":"alipay","children":[{"title":"Alipay.class <span style='color:#111;'> 1.98KB </span>","children":null,"spread":false}],"spread":true},{"title":"pojo","children":[{"title":"AlipayBean.class <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false}],"spread":true},{"title":"servletTest","children":[{"title":"zhifubaoServlet.class <span style='color:#111;'> 2.39KB </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"order","children":[{"title":"OrderController.class <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"PayServiceImpl.class <span style='color:#111;'> 761B </span>","children":null,"spread":false},{"title":"PayService.class <span style='color:#111;'> 252B </span>","children":null,"spread":false}],"spread":false},{"title":"AlipayProperties.class <span style='color:#111;'> 3.39KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明