/*
* 文 件 名: PaymentRequestData.java
* 描 述:
<描述>
* 修 改 人: Administrator
* 修改时间: Dec 7, 2010
* 跟踪单号:
<跟踪单号>
* 修改单号:
<修改单号>
* 修改内容:
<修改内容>
*/
package com.temobi.fms.servlet;
import com.temobi.fms.common.util.NetUtil;
import com.temobi.fms.common.util.SysLog;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 接收支付结果的回调接口。 由联动优势调用
*
* @author Administrator
* @version [版本号, Dec 7, 2010]
* @see [相关类/方法]
* @since [产品/模块版本]
*/
public class OrderResultCallbackServlet extends HttpServlet
{
/**
* 注释内容
*/
private static final long serialVersionUID = 1L;
public void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
SysLog.info("callback receive a http request from:"
+ NetUtil.parseRemoteIp(request));
java.util.Enumeration keys = request.getParameterNames();
while (keys.hasMoreElements())
{
String key = (String) keys.nextElement();
String value = (String) request.getParameter(key);
SysLog.info("callback receive:" + key + ",value:" + value);
System.out.println("callback receive:" + key + ",value:" + value);
}
java.io.BufferedReader reader = null;
try
{
reader = new java.io.BufferedReader(new java.io.InputStreamReader(
request.getInputStream()));
if (reader != null)
{
String line = null;
while ((line = reader.readLine()) != null)
{
SysLog.info("callback receive from stream:" + line);
}
}
response.getOutputStream().close();
}
catch (Exception e)
{
SysLog.error("callback", e);
}
finally
{
if (reader != null)
{
try
{
reader.close();
}
catch (Exception e)
{
}
}
}
}
}
09-07
09-07
09-07