protected void Page_Load(object sender, EventArgs e) { //创建支付应答对象 ResponseHandler resHandler = new ResponseHandler(Context); resHandler.Init(); resHandler.SetKey(TenPayInfo.Key, TenPayInfo.AppKey); //判断签名 if (resHandler.IsWXsignfeedback()) { //回复服务器处理成功 Response.Write("OK"); Response.Write("OK:" + resHandler.GetDebugInfo()); } else { //sha1签名失败 Response.Write("fail"); Response.Write("fail:" + resHandler.GetDebugInfo()); } Response.End(); }
public ActionResult FeedBack() { //创建支付应答对象 ResponseHandler resHandler = new ResponseHandler(null); resHandler.Init(); resHandler.SetKey(TenPayInfo.Key, TenPayInfo.AppKey); //判断签名 if (resHandler.IsWXsignfeedback()) { //回复服务器处理成功 Response.Write("OK"); Response.Write("OK:" + resHandler.GetDebugInfo()); } else { //sha1签名失败 Response.Write("fail"); Response.Write("fail:" + resHandler.GetDebugInfo()); } return null; }