随笔 - 83,  文章 - 6,  评论 - 20,  阅读 - 10万

 

 

 config代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
using Tea;
 
namespace Alipay.EasySDK.Kernel
{
    /// <summary>
    /// 客户端配置参数模型
    /// </summary>
    public class Config : TeaModel
    {
        /// <summary>
        /// 通信协议,通常填写https
        /// </summary>
        [NameInMap("protocol")]
        [Validation(Required = true)]
        public string Protocol { get; set; } = "https";
 
        /// <summary>
        /// 网关域名
        /// 线上为:openapi.alipay.com
        /// 沙箱为:openapi.alipaydev.com
        /// </summary>
        [NameInMap("gatewayHost")]
        [Validation(Required = true)]
        public string GatewayHost { get; set; } = "openapi.alipay.com";
 
        /// <summary>
        /// AppId
        /// </summary>
        [NameInMap("appId")]
        [Validation(Required = true)]
        public string AppId { get; set; }
 
        /// <summary>
        /// 签名类型,Alipay Easy SDK只推荐使用RSA2,估此处固定填写RSA2
        /// </summary>
        [NameInMap("signType")]
        [Validation(Required = true)]
        public string SignType { get; set; } = "RSA2";
 
        /// <summary>
        /// 支付宝公钥
        /// </summary>
        [NameInMap("alipayPublicKey")]
        [Validation(Required = true)]
        public string AlipayPublicKey { get; set; }
 
        /// <summary>
        /// 应用私钥
        /// </summary>
        [NameInMap("merchantPrivateKey")]
        [Validation(Required = true)]
        public string MerchantPrivateKey { get; set; }
 
        /// <summary>
        /// 应用公钥证书文件路径
        /// </summary>
        [NameInMap("merchantCertPath")]
        [Validation(Required = true)]
        public string MerchantCertPath { get; set; }
 
        /// <summary>
        /// 支付宝公钥证书文件路径
        /// </summary>
        [NameInMap("alipayCertPath")]
        [Validation(Required = true)]
        public string AlipayCertPath { get; set; }
 
        /// <summary>
        /// 支付宝根证书文件路径
        /// </summary>
        [NameInMap("alipayRootCertPath")]
        [Validation(Required = true)]
        public string AlipayRootCertPath { get; set; }
 
        /// <summary>
        /// 异步通知回调地址(可选)
        /// </summary>
        [NameInMap("notifyUrl")]
        [Validation(Required = true)]
        public string NotifyUrl { get; set; }
 
        /// <summary>
        /// AES密钥(可选)
        /// </summary>
        [NameInMap("encryptKey")]
        [Validation(Required = true)]
        public string EncryptKey { get; set; }
    }
}

1.AppId :开放平台密钥 相关应用的APPID

 

 

2.AlipayPublicKey (支付宝公钥):具体是指上图中【接口加签方式】 设置的支付宝公钥。

(1)未设置:使用【支付宝密钥生成器】生成应用公钥,复制过来保存设置,之后可以获取应用的支付宝公钥(特别注意:生成密钥时,要选择正确的密钥格式

 

 

(2)已设置

 

 

3.MerchantPrivateKey(应用私钥):【接口加签方式】设置时,使用【支付宝密钥生成器】——生成密钥——生成的应用密钥(特别注意:生成密钥时,要选择正确的密钥格式

 

特别注意:生成密钥时,要选择正确的密钥格式

暂时还未用到其他配置参数,如果后续有用到会陆续补充进来了。

posted on   £冷☆月№  阅读(2518)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示