Kaynağa Gözat

将图片存放到 https://github.com/essensoft/media

Roc 6 yıl önce
ebeveyn
işleme
b14c8250fc

+ 4 - 2
Payment.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26124.0
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29009.5
 MinimumVisualStudioVersion = 15.0.26124.0
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{DD8CC860-F3E3-40F4-8A8F-20BF66EA051C}"
 EndProject
@@ -26,6 +26,8 @@ EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution-items", "solution-items", "{E2D9A588-E676-446B-BE7B-B3AAAD9FC9B6}"
 	ProjectSection(SolutionItems) = preProject
 		common.props = common.props
+		LICENSE = LICENSE
+		README.MD = README.MD
 	EndProjectSection
 EndProject
 Global

+ 4 - 9
README.MD

@@ -1,4 +1,4 @@
-![Payment](https://raw.githubusercontent.com/Essensoft/Payment/master/images/Payment-Title.png)
+![Payment](https://raw.githubusercontent.com/essensoft/media/master/images/github/payment.png)
 
 ## 简介
 
@@ -59,25 +59,20 @@ Essensoft.AspNetCore.Payment.Security       | [![NuGet](https://img.shields.io/n
 
 ## 开发环境
 * Windows 10
-* VS2017 15.9.3
-* .NET Core 2.2、.NET Core 2.1
+* VS2019
 
 ## 运行环境
-* .NET Core 2.1+
+* .NET Core 2.2、.NET Core 2.1
 
 ## 使用方式
 
-* [配置参数(支持多商户)](docs/Configuration.md)
-
-* [配置HttpClient(支持API证书)](docs/Using-HttpClient.md)
-
 * [查看示例项目](samples/WebApplicationSample)
 
 ----
 
 ## 打赏
 
-![Payment](https://raw.githubusercontent.com/Essensoft/Payment/master/images/QrCode.png)
+![Payment](https://raw.githubusercontent.com/essensoft/media/master/images/github/qrcode.png)
 
 ---
 

+ 4 - 4
common.props

@@ -4,11 +4,11 @@
     <NoWarn>$(NoWarn);CS1570;CS1591</NoWarn>
     <Description>Essensoft.AspNetCore.Payment</Description>
     <Copyright>© Essensoft 2019</Copyright>
-    <PackageIconUrl>https://raw.githubusercontent.com/Essensoft/Payment/master/images/Payment.png</PackageIconUrl>
-    <PackageProjectUrl>https://github.com/Essensoft/Payment</PackageProjectUrl>
+    <PackageIconUrl>https://raw.githubusercontent.com/essensoft/media/master/images/nuget/payment.png</PackageIconUrl>
+    <PackageProjectUrl>https://github.com/essensoft/payment</PackageProjectUrl>
     <RepositoryType>git</RepositoryType>
-    <RepositoryUrl>https://github.com/Essensoft/Payment</RepositoryUrl>
-    <PackageLicenseUrl>https://raw.githubusercontent.com/Essensoft/Payment/master/LICENSE</PackageLicenseUrl>
+    <RepositoryUrl>https://github.com/essensoft/payment</RepositoryUrl>
+    <PackageLicenseUrl>https://raw.githubusercontent.com/essensoft/payment/master/LICENSE</PackageLicenseUrl>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)' == 'Release' ">

+ 0 - 62
docs/Configuration.md

@@ -1,62 +0,0 @@
-# 关于Payment中 参数设置 介绍
-
-## 以WeChatPay为例,有以下3种方式:
-
-1. 引入WeChatPay同时设置参数(内置选项配置)
-```
-services.AddWeChatPay(opt => { opt.AppId = "xx"; opt.MchId = "xx"; opt.Key = "xx"; });
-```
-
-2. 使用配置文件的方式设置参数(选项配置) [微软官方教程](https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/configuration/options?view=aspnetcore-2.1)
-
-* 设置配置文件 appsettings.json
-```
-{
-  "WeChatPay": {
-    "AppId": "xxx",
-    "MchId": "xxx",
-    "Key": "xxx",
-    "Certificate": "xxx"
-  },
-}
-```
-
-* 配置选项
-```
-services.Configure<WeChatPayOptions>(Configuration.GetSection("WeChatPay"));
-```
-
-3. 多商户模式配置
-
-* 设置配置文件 appsettings.json
-```
-{
-  "WeChatPay1": {
-    "AppId": "xxx",
-    "MchId": "xxx",
-    "Key": "xxx",
-    "Certificate": "xxx"
-  },
-  "WeChatPay2": {
-  "AppId": "xxx",
-  "MchId": "xxx",
-  "Key": "xxx",
-  "Certificate": "xxx"
-  },
-}
-```
-
-* 配置多个商户选项
-
-```
-// WeChatPay1 / WeChatPay2 为选项名称 可自定义 调用的时候需要用到。
-services.Configure<WeChatPayOptions>("WeChatPay1",Configuration.GetSection("WeChatPay1"));
-services.Configure<WeChatPayOptions>("WeChatPay2",Configuration.GetSection("WeChatPay2"));
-```
-
-* 调用指定商户配置选项(根据选项名称)
-```
-await _client.ExecuteAsync(request, "WeChatPay1");
-```
-
-注:具体配置选项参数可查看对应Options,例如 WeChatPayOptions、AlipayOptions、...

+ 0 - 35
docs/Using-HttpClient.md

@@ -1,35 +0,0 @@
-# 关于Payment中使用 HttpClient 配置介绍
-
-## Payment使用HttpClient提交API请求,务必在项目中引入它。
-
-## 引入 HttpClient
-
-```
-services.AddHttpClient();
-```
-
-## API证书配置(仅QPay 与 WeChatPay的部分API 使用到API证书。)
-
-* API证书配置
-
-```
-// 证书名称可自定义
-services.AddHttpClient("证书名称").ConfigurePrimaryHttpMessageHandler(() =>
-{
-    // 载入证书
-    var certificate = new X509Certificate2("", "", X509KeyStorageFlags.MachineKeySet);
-    var handler = new HttpClientHandler();
-    handler.ClientCertificates.Add(certificate);
-    return handler;
-});
-```
-
-* API证书使用
-
-```
-var request = new WeChatPayRefundRequest()
-{
-...
-};
-var response = await _client.ExecuteAsync(request, "证书名称");
-```

BIN
images/Payment-Title.png


BIN
images/Payment.png


+ 1 - 1
samples/WebApplicationSample/Views/Home/Gratuity.cshtml

@@ -3,7 +3,7 @@
     ViewData["Title"] = "打赏";
 }
 <div align="center">
-    <img src="~/images/payment.png">
+    <img src="~/images/qrcode.png">
     <hr />
     <p>感谢你对本项目的支持!!!</p>
 </div>

BIN
samples/WebApplicationSample/wwwroot/images/Payment-Title.png


BIN
samples/WebApplicationSample/wwwroot/images/payment.png


+ 0 - 0
images/QrCode.png → samples/WebApplicationSample/wwwroot/images/qrcode.png