一、前台页面代码

1、主要标签:

<form></form>
<div></div>
<dl>
<dt></dt>
<dd></dd>
<dl>
<span></span>
<ol>
<li></li>
</ol>
<ul>
<li></li></ul>
<font></font>

2、用到的控件

1)Textbox

2)Button

3、核心代码

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server"><title>支付宝纯网关接口</title><style>
*{margin:0;padding:0;
}
ul,ol{list-style:none;
}
.title{color: #ADADAD;font-size: 14px;font-weight: bold;padding: 8px 16px 5px 10px;
}
.hidden{display:none;
}.new-btn-login-sp{border:1px solid #D74C00;padding:1px;display:inline-block;
}.new-btn-login{background-color: #ff8c00;color: #FFFFFF;font-weight: bold;border: medium none;width:82px;height:28px;
}
.new-btn-login:hover{background-color: #ffa300;width: 82px;color: #FFFFFF;font-weight: bold;height: 28px;
}
.bank-list{overflow:hidden;margin-top:5px;
}
.bank-list li{float:left;width:153px;margin-bottom:5px;
}#main{width:750px;margin:0 auto;font-size:14px;font-family:'宋体';
}
#logo{background-color: transparent;background-image: url("images/new-btn-fixed.png");border: medium none;background-position:0 0;width:166px;height:35px;float:left;
}
.red-star{color:#f00;width:10px;display:inline-block;
}
.null-star{color:#fff;
}
.content{margin-top:5px;
}.content dt{width:160px;display:inline-block;text-align:right;float:left;}
.content dd{margin-left:100px;margin-bottom:5px;
}
#foot{margin-top:10px;
}
.foot-ul li {text-align:center;
}
.note-help {color: #999999;font-size: 12px;line-height: 130%;padding-left: 3px;
}.cashier-nav {font-size: 14px;margin: 15px 0 10px;text-align: left;height:30px;border-bottom:solid 2px #CFD2D7;
}
.cashier-nav ol li {float: left;
}
.cashier-nav li.current {color: #AB4400;font-weight: bold;
}
.cashier-nav li.last {clear:right;
}
.alipay_link {text-align:right;
}
.alipay_link a:link{text-decoration:none;color:#8D8D8D;
}
.alipay_link a:visited{text-decoration:none;color:#8D8D8D;
}
</style>#regionstyle 样式#endregion
</head>
<body>#region核心代码部分#endgrion<form id="Form1" runat="server"><div id="main"><div id="head"><dl class="alipay_link"><a target="_blank" href="http://www.alipay.com/"><span>支付宝首页</span></a>| <a target="_blank"href="https://b.alipay.com/home.htm"><span>商家服务</span></a>| <a target="_blank" href="http://help.alipay.com/support/index_sh.htm"><span>帮助中心</span></a></dl><span class="title">支付宝纯网关接口快速通道</span></div><div class="cashier-nav"><ol><li class="current">1、确认信息 →</li><li>2、点击确认 →</li><li class="last">3、确认完成</li></ol></div><div id="body" style="clear: left"><dl class="content"><dt>商户订单号:</dt><dd><span class="null-star">*</span><asp:TextBox ID="WIDout_trade_no" name="WIDout_trade_no" runat="server"></asp:TextBox><span>商户网站订单系统中唯一订单号,必填
</span></dd><dt>订单名称:</dt><dd><span class="null-star">*</span><asp:TextBox ID="WIDsubject" name="WIDsubject" runat="server"></asp:TextBox><span>必填
</span></dd><dt>付款金额:</dt><dd><span class="null-star">*</span><asp:TextBox ID="WIDtotal_fee" name="WIDtotal_fee" runat="server"></asp:TextBox><span>必填
</span></dd><dt>订单描述
:</dt><dd><span class="null-star">*</span><asp:TextBox ID="WIDbody" name="WIDbody" runat="server"></asp:TextBox><span></span></dd><dt>默认网银:</dt><dd><span class="null-star">*</span><asp:TextBox ID="WIDdefaultbank" name="WIDdefaultbank" runat="server"></asp:TextBox><span>必填,银行简码请参考接口技术文档
</span></dd><dt>商品展示地址:</dt><dd><span class="null-star">*</span><asp:TextBox ID="WIDshow_url" name="WIDshow_url" runat="server"></asp:TextBox><span>需以http://www.bel-kjh.com,例如:http://www.商户网址.com/myorder.html
</span></dd><dt></dt><dd><span class="new-btn-login-sp"><asp:Button ID="BtnAlipay" name="BtnAlipay" class="new-btn-login" Text="确 认" Style="text-align: center;"runat="server" OnClick="BtnAlipay_Click"/></span></dd></dl></div><div id="foot"><ul class="foot-ul"><li><font class="note-help">如果您点击“确认”按钮,即表示您同意该次的执行操作。 </font></li><li>支付宝版权所有 2011-2015 ALIPAY.COM </li></ul><ul></div></div></form>
</body>
</html>二、效果

三、后台代码
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml;
using Com.Alipay;/// <summary>
/// 功能:纯网关接口接入页
/// 版本:3.3
/// 日期:2012-07-05
/// 说明:
/// 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
/// 该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
///
/// /注意///
/// 如果您在接口集成过程中遇到问题,可以按照下面的途径来解决
/// 1、商户服务中心(https://b.alipay.com/support/helperApply.htm?action=consultationApply),提交申请集成协助,我们会有专业的技术工程师主动联系您协助解决
/// 2、商户帮助中心(http://help.alipay.com/support/232511-16307/0-16307.htm?sh=Y&info_type=9)
/// 3、支付宝论坛(http://club.alipay.com/read-htm-tid-8681712.html)
///
/// 如果不想使用扩展功能请把扩展功能参数赋空值。
/// </summary>
public partial class _Default : System.Web.UI.Page
{protected void Page_Load(object sender, EventArgs e){}protected void BtnAlipay_Click(object sender, EventArgs e){请求参数//支付类型string payment_type = "1";//必填,不能修改//服务器异步通知页面路径string notify_url = "http://商户网关地址/create_direct_pay_by_user-CSHARP-UTF-8/notify_url.aspx";//需http://格式的完整路径,不能加?id=123这类自定义参数//页面跳转同步通知页面路径string return_url = "http://商户网关地址/create_direct_pay_by_user-CSHARP-UTF-8/return_url.aspx";//需http://格式的完整路径,不能加?id=123这类自定义参数,不能写成http://localhost///商户订单号string out_trade_no = WIDout_trade_no.Text.Trim();//商户网站订单系统中唯一订单号,必填//订单名称string subject = WIDsubject.Text.Trim();//必填//付款金额string total_fee = WIDtotal_fee.Text.Trim();//必填//订单描述string body = WIDbody.Text.Trim();//默认支付方式string paymethod = "bankPay";//必填//默认网银string defaultbank = WIDdefaultbank.Text.Trim();//必填,银行简码请参考接口技术文档//商品展示地址string show_url = WIDshow_url.Text.Trim();//需以http://开头的完整路径,例如:http://www.商户网址.com/myorder.html//防钓鱼时间戳string anti_phishing_key = "";//若要使用请调用类文件submit中的query_timestamp函数//客户端的IP地址string exter_invoke_ip = "";//非局域网的外网IP地址,如:221.0.0.1//把请求参数打包成数组SortedDictionary<string, string> sParaTemp = new SortedDictionary<string, string>();sParaTemp.Add("partner", Config.Partner);sParaTemp.Add("seller_email", Config.Seller_email);sParaTemp.Add("_input_charset", Config.Input_charset.ToLower());sParaTemp.Add("service", "create_direct_pay_by_user");sParaTemp.Add("payment_type", payment_type);sParaTemp.Add("notify_url", notify_url);sParaTemp.Add("return_url", return_url);sParaTemp.Add("out_trade_no", out_trade_no);sParaTemp.Add("subject", subject);sParaTemp.Add("total_fee", total_fee);sParaTemp.Add("body", body);sParaTemp.Add("paymethod", paymethod);sParaTemp.Add("defaultbank", defaultbank);sParaTemp.Add("show_url", show_url);sParaTemp.Add("anti_phishing_key", anti_phishing_key);sParaTemp.Add("exter_invoke_ip", exter_invoke_ip);//建立请求string sHtmlText = Submit.BuildRequest(sParaTemp, "get", "确认");Response.Write(sHtmlText);}
}

  

  

转载于:https://www.cnblogs.com/huanghuike/p/4830394.html

ASP.NET 第五天 CSS在支付宝中的应用相关推荐

  1. html5类选择器用什么表示,HTML_揭秘常用的五类CSS选择器用法,有许多新手朋友不知道在什么 - phpStudy...

    揭秘常用的五类CSS选择器用法 有许多新手朋友不知道在什么情况下运用什么样的CSS选择器,针对新手朋友,对CSS选择器作一些简单的说明,这里重点介绍一下最常用的五类CSS选择器的使用. 本文向大家描述 ...

  2. 七天学会ASP.NET MVC (五)——Layout页面使用和用户角色管理

    系列文章 七天学会ASP.NET MVC (一)--深入理解ASP.NET MVC 七天学会ASP.NET MVC (二)--ASP.NET MVC 数据传递 七天学会ASP.NET MVC (三)- ...

  3. ASP.NET MVC (五、HttpClient接口解析)

    目录 前言: 1.MVC项目创建 2.[GET]请求的API解析 3.[Post]请求[API]解析 前言: MVC对于已经跨域的接口进行解析是个比较容易的事情.况且在第四章节的时候已经通过Ajax进 ...

  4. python春节集五福_2017支付宝集五福 2017年支付宝五福活动的python生福脚本

    2017支付宝集五福 2017年支付宝五福活动的python生福脚本 2017年支付宝五福活动的python生福脚本:各位大神面前班门弄个斧,个人觉得,这是先判断图案特征,然后按一个随机模型,判定出不 ...

  5. html+css+支付宝页面,CSS仿支付宝菜单,自己亲手写的

    CSS仿支付宝菜单 * { padding:0px; margin:0px; list-style:none; } body { font-size:14px; font-family:Verdana ...

  6. 五个CSS性能工具可加速您的网站

    在本文中,我将列出五个CSS性能工具,这些工具将帮助您将网站置于CSS架构上,以实现快速加载体验. 为什么页面速度如此重要? 快速加载的网站对于网站的成功至关重要.有研究发现支持以下观点:如果用户不得 ...

  7. asp简介和五大内置对象

    目次 1.ASP基础 2.ASP的五大对象 3.Request对象 4.Response对象 5.Server对象 6.Application对象 7.Session对象 1.ASP基础 Micros ...

  8. css网页布局中文字排版的属性和用法

    前段时间,学习了几个大的网站的图文混排的方法.今天总结下, css网页布局中文字排版的相关属性以及用法 .包括:设定字体.颜色.大小.段落空白,首字下沉.首行缩进.中文字的截断.固定宽度词内折行(wo ...

  9. ASP.NET MVC5 + EF6 入门教程 (6) View中的Razor使用

    ASP.NET MVC5 + EF6 入门教程 (6) View中的Razor使用 原文:ASP.NET MVC5 + EF6 入门教程 (6) View中的Razor使用 文章来源: Slark.N ...

最新文章

  1. hadoop学习--K-Means(聚类算法)
  2. C++primer CH12智能指针
  3. endl、flush、ends、unitbuf、nounitbuf区别及详解
  4. 经验 | 深度学习如何挑选GPU?
  5. 阿里20周年年会散场后,6万人会场无一片垃圾,保洁阿姨都无瓶可捡了
  6. DropDownList第一个默认值
  7. Dubbo不向zookeeper/nacos注册
  8. DLL编写中extern “C”和__stdcall的作用
  9. Gnutella 及无结构化(非结构化)P2p的一些总结
  10. 软件测试的术语SRS,HLD,LLD,BD,FD,DD意义
  11. 三阶魔方背后的神奇数学
  12. keep怎么生成运动轨迹_KEEP的另类使用技巧——旅行记录
  13. vb.net电子时钟实例
  14. 英文双引号引发的杯具
  15. 家用监控摄像头意想不到的五条用途
  16. 【腾讯地图API】制作多途经点的线路导航——路线坐标规划
  17. totolink路由器虚拟服务器,不怕没信号 TOTOLINK-N350R路由器任你用
  18. 谈谈 COS 中国自主知识产权智能手机操作系统
  19. 基于JAVA宠物领养系统计算机毕业设计源码+系统+lw文档+部署
  20. 运放的NC端时啥意思

热门文章

  1. nginx服务器access_log日志分析及配置详解
  2. 字节跳动技术整理:mysql查询重复数据sql
  3. 服务器,工作站和终端机
  4. 实时监控fps的linux代码,GitHub - Forec/monitor-recorder: Monitor (实时视频监控、运动检测视频记录)...
  5. debian php redis,debian7.7环境下 源码安装redis以及phpredis扩展
  6. 2020浙江9月计算机等级考试,浙江2020年9月计算机等级报考具体流程
  7. python元素定位id和name_Python+Selenium自动化软件测试实战:Xpath,class,id,name定位和Iframe框架跳转...
  8. 网站内部优化的4个细节小技巧
  9. 网站长尾关键词优化有门道!
  10. 一般物流网站建设有哪些必备版块?