Skip to content

Commit db8e491

Browse files
committed
添加.Net Demo
1 parent 1bc0eac commit db8e491

31 files changed

+2559
-84
lines changed

PaySharp.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PaySharp.Demo", "sample\Pay
1919
EndProject
2020
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PaySharp.Qpay", "src\PaySharp.Qpay\PaySharp.Qpay.csproj", "{E63F24B7-C8EE-4E92-8897-38FB117CE371}"
2121
EndProject
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PaySharp.Demo(Net)", "sample\PaySharp.Demo(Net)\PaySharp.Demo(Net).csproj", "{C5D9D464-563B-44FC-A115-25889A73CA23}"
23+
EndProject
2224
Global
2325
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2426
Debug|Any CPU = Debug|Any CPU
@@ -57,6 +59,10 @@ Global
5759
{E63F24B7-C8EE-4E92-8897-38FB117CE371}.Debug|Any CPU.Build.0 = Debug|Any CPU
5860
{E63F24B7-C8EE-4E92-8897-38FB117CE371}.Release|Any CPU.ActiveCfg = Release|Any CPU
5961
{E63F24B7-C8EE-4E92-8897-38FB117CE371}.Release|Any CPU.Build.0 = Release|Any CPU
62+
{C5D9D464-563B-44FC-A115-25889A73CA23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63+
{C5D9D464-563B-44FC-A115-25889A73CA23}.Debug|Any CPU.Build.0 = Debug|Any CPU
64+
{C5D9D464-563B-44FC-A115-25889A73CA23}.Release|Any CPU.ActiveCfg = Release|Any CPU
65+
{C5D9D464-563B-44FC-A115-25889A73CA23}.Release|Any CPU.Build.0 = Release|Any CPU
6066
EndGlobalSection
6167
GlobalSection(SolutionProperties) = preSolution
6268
HideSolutionNode = FALSE
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Web.Mvc;
2+
using System.Web.Routing;
3+
4+
namespace PaySharp.Demo_Net_
5+
{
6+
public class RouteConfig
7+
{
8+
public static void RegisterRoutes(RouteCollection routes)
9+
{
10+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
11+
12+
routes.MapRoute(
13+
name: "Default",
14+
url: "{controller}/{action}/{id}",
15+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
16+
);
17+
}
18+
}
19+
}
3.74 KB
Binary file not shown.
4.91 KB
Binary file not shown.
2.79 KB
Binary file not shown.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
@CHARSET "UTF-8";
2+
/*! index页面 */
3+
.ui-tabs-vertical {
4+
width: 51.5em;
5+
}
6+
7+
.ui-tabs-vertical .ui-tabs-nav {
8+
padding: .2em .1em .2em .2em;
9+
float: left;
10+
width: 11em;
11+
}
12+
13+
.ui-tabs-vertical .ui-tabs-nav li {
14+
clear: left;
15+
width: 100%;
16+
border-bottom-width: 1px !important;
17+
border-right-width: 0 !important;
18+
margin: 0 -1px .2em 0;
19+
}
20+
21+
.ui-tabs-vertical .ui-tabs-nav li a {
22+
display: block;
23+
}
24+
25+
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active {
26+
padding-bottom: 0;
27+
padding-right: .1em;
28+
border-right-width: 1px;
29+
border-right-width: 1px;
30+
}
31+
32+
.ui-tabs-vertical .ui-tabs-panel {
33+
padding: 1.2em;
34+
float: right;
35+
width: 37.5em;
36+
}
37+
38+
.ui-tabs {
39+
font-family: 微软雅黑;
40+
}
41+
42+
div#header {
43+
width: inherit;
44+
height: 3em;
45+
}
46+
47+
div#wrapper {
48+
font-family: 微软雅黑;
49+
width: 62em;
50+
margin: 0 auto;
51+
font-size: 16px;
52+
color: #5E5E5E;
53+
}
54+
55+
h1, h2, h3, h4, h5, h6, h7, .ui-tooltip {
56+
font-family: 微软雅黑 !important;
57+
color: #555 !important;
58+
}
59+
60+
61+
/*! 各个接口的页面 */
62+
hr {
63+
height: 1px;
64+
border: none;
65+
border-top: 1px dashed #9DC45F;
66+
}
67+
68+
.api-form {
69+
margin-left: auto;
70+
margin-right: auto;
71+
background: #F8F8F8;
72+
padding: 30px 30px 20px 30px;
73+
color: #666;
74+
border-radius: 5px;
75+
-webkit-border-radius: 5px;
76+
-moz-border-radius: 5px;
77+
}
78+
79+
.api-form p {
80+
display: block;
81+
margin: 0px 0px 5px;
82+
}
83+
84+
.api-form p > label {
85+
float: left;
86+
width: 10em;
87+
text-align: right;
88+
padding-right: 0.5em;
89+
margin-top: .1em;
90+
color: #5E5E5E;
91+
}
92+
93+
.api-form input[type="text"] {
94+
border: 1px solid #E5E5E5;
95+
;
96+
color: #555;
97+
height: 20px;
98+
line-height: 15px;
99+
margin-bottom: 16px;
100+
margin-right: 6px;
101+
margin-top: 2px;
102+
outline: 0 none;
103+
padding: 5px 0px 5px 5px;
104+
width: 65%;
105+
border-radius: 4px;
106+
-webkit-border-radius: 4px;
107+
-moz-border-radius: 4px;
108+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
109+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
110+
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
111+
}
112+
113+
.api-form input.button {
114+
font-family: 微软雅黑;
115+
background-color: #9DC45F;
116+
border-radius: 5px;
117+
-webkit-border-radius: 5px;
118+
-moz-border-border-radius: 5px;
119+
border: none;
120+
padding: 10px 25px 10px 25px;
121+
color: #FFF;
122+
text-shadow: 1px 1px 1px #949494;
123+
}
124+
125+
.api-form input.button:hover {
126+
font-family: 微软雅黑;
127+
background-color: #80A24A;
128+
}
129+
130+
.api-form .showFaqBtn {
131+
font-family: 微软雅黑;
132+
float: right;
133+
background-color: transparent;
134+
color: inherit;
135+
border: none;
136+
padding: 10px 25px 10px 25px;
137+
}
138+
139+
.faq {
140+
font-size: 14px;
141+
font-weight: normal;
142+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$(function () {
2+
$("#tabs-api").tabs();
3+
setApiDemoTabs("#tabs-purchase-alipay");
4+
setApiDemoTabs("#tabs-purchase-wechatpay");
5+
setApiDemoTabs("#tabs-purchase-qpay");
6+
setApiDemoTabs("#tabs-purchase-jdpay");
7+
setApiDemoTabs("#tabs-purchase-unionpay");
8+
$(document).tooltip();
9+
});
10+
11+
function setApiDemoTabs(selector) {
12+
$(selector).tabs({
13+
beforeLoad: function (event, ui) {
14+
ui.jqXHR.error(function () { ui.panel.html("加载中"); });
15+
}, load: function (event, ui) {
16+
$(".question").hide();
17+
$(".showFaqBtn").click(
18+
function () { $(".question").toggle(); });
19+
}
20+
}).addClass("ui-tabs-vertical ui-helper-clearfix");
21+
$(selector + " li").removeClass("ui-corner-top").addClass("ui-corner-left");
22+
}
31.3 KB
Binary file not shown.

sample/PaySharp.Demo(Net)/Content/jquery-ui.min.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sample/PaySharp.Demo(Net)/Content/jquery-ui.min.js

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)