1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- //using System.Linq;
- using System.Web;
- /// <summary>
- /// 基础配置类
- /// </summary>
- namespace EMIS.Utility.OnlinePay.Alipay
- {
- public class Config
- {
- public static string alipay_public_key = @"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiyaUUHELeW+TBbEPep19IB/aVjakOZ9E3CKr4BXiC60kgQBXg6Ng8QRK7cEel3u3U0Tj4Eqe2hnRSCQPbvWOqFWPXvv+47bSXxyh4MCDgrBD11oSFjY7dD85DqW0vfr5kLBXKMze56o37sD1JKyTiUQnYo9sIrIock4eqMoBFks58yBdbdhhUweJizmPUnPATCMSlc03DuXvFNFxcNk3sVp3ZWt7YvMNo63xxt0snLVVT1Zc78eLVIQwQlizzMhDRy4IXpxNVIUmKxRiiM8+lFHZH6KinNXOBa/Z5gFyJa3cqfWWcbyRzeJx4BPsQaEmXmdAiDM+PnMdS2+PP9XJJwIDAQAB";
-
-
- //这里要配置没有经过的原始私钥
- //开发者私钥
- public static string merchant_private_key = @"MIIEpQIBAAKCAQEAraWP3Es6QGuQUoxYVXyxUNLuvwScI8H40tu1ha4TKRG6tjnTOPAIiquTRp4XkRqBJTXBLLAItof+AnUJnUaRDA1dJ7+GOsv/4uSxyqeEgGpd7eRQWJS17YVepzZEBQwyugILQd2ETA/+G1OJjB2DF3s7oGNxQlJcbl1PV/sOG6tIbYun4oKy1pmlCRrCnK4lVDAnXBHQ0ZYo8RilcOWfU/uXc4NH/FxVoE5QHcWD7Tgz7s+W/poX5a9jduvUCoJFo0AjFQpx2yKxy/gvFzQNkloICl0A0XjVolR6PrgqkVxAI7fJb93/S9W2IGAVZAT2AP77mDdQx+itwYMiL6AxpQIDAQABAoIBAAPul89ZNLx4sw/rdaSZ6jn2TMmuhQqaPdQofXfFdVGcwSmXLZ1AcjERqYgT1FzIyNva18D3S3s2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dxCrgdUgIf2JTvmAv8ESZ+SEYo1EP74qzXoWsRJdRCSwHVeTzUY2kFDM=";
-
- //开发者公钥
- public static string merchant_public_key = @"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAraWP3Es6QGuQUoxYVXyxUNLuvwScI8H40tu1ha4TKRG6tjnTOPAIiquTRp4XkRqBJTXBLLAItof+AnUJnUaRDA1dJ7+GOsv/4uSxyqeEgGpd7eRQWJS17YVepzZEBQwyugILQd2ETA/+G1OJjB2DF3s7oGNxQlJcbl1PV/sOG6tIbYun4oKy1pmlCRrCnK4lVDAnXBHQ0ZYo8RilcOWfU/uXc4NH/FxVoE5QHcWD7Tgz7s+W/poX5a9jduvUCoJFo0AjFQpx2yKxy/gvFzQNkloICl0A0XjVolR6PrgqkVxAI7fJb93/S9W2IGAVZAT2AP77mDdQx+itwYMiL6AxpQIDAQAB";
- //应用ID
- public static string appId = "2016102200735433";
- //合作伙伴ID:partnerID
- public static string pid = "2088102180581747";
- //支付宝网关
- //public static string serverUrl = "https://openapi.alipay.com/gateway.do";
- public static string serverUrl = "https://openapi.alipaydev.com/gateway.do";
- public static string mapiUrl = "https://mapi.alipay.com/gateway.do";
- public static string monitorUrl = "http://mcloudmonitor.com/gateway.do";
- //编码,无需修改
- public static string charset = "utf-8";
- //签名类型,支持RSA2(推荐!)、RSA
- //public static string sign_type = "RSA2";
- public static string sign_type = "RSA2";
- //版本号,无需修改
- public static string version = "1.0";
-
- /// <summary>
- /// 公钥文件类型转换成纯文本类型
- /// </summary>
- /// <returns>过滤后的字符串类型公钥</returns>
- public static string getMerchantPublicKeyStr()
- {
- StreamReader sr = new StreamReader(merchant_public_key);
- string pubkey = sr.ReadToEnd();
- sr.Close();
- if (pubkey != null)
- {
- pubkey= pubkey.Replace("-----BEGIN PUBLIC KEY-----", "");
- pubkey = pubkey.Replace("-----END PUBLIC KEY-----", "");
- pubkey = pubkey.Replace("\r", "");
- pubkey = pubkey.Replace("\n", "");
- }
- return pubkey;
- }
- /// <summary>
- /// 私钥文件类型转换成纯文本类型
- /// </summary>
- /// <returns>过滤后的字符串类型私钥</returns>
- public static string getMerchantPriveteKeyStr()
- {
- StreamReader sr = new StreamReader(merchant_private_key);
- string pubkey = sr.ReadToEnd();
- sr.Close();
- if (pubkey != null)
- {
- pubkey = pubkey.Replace("-----BEGIN PUBLIC KEY-----", "");
- pubkey = pubkey.Replace("-----END PUBLIC KEY-----", "");
- pubkey = pubkey.Replace("\r", "");
- pubkey = pubkey.Replace("\n", "");
- }
- return pubkey;
- }
- }
- }
|