123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.IO;
- using System.Linq;
- using System.Web;
- namespace Central.Control.WebApi.Config
- {
-
-
-
- public class AliPayConfig
- {
-
-
-
- public static string alipay_public_key = ConfigurationManager.AppSettings["alipay_public_key"].ToString();
-
-
-
- public static string merchant_private_key = ConfigurationManager.AppSettings["alipay_merchant_private_key"].ToString();
-
-
-
- public static string merchant_public_key = ConfigurationManager.AppSettings["alipay_merchant_public_key"].ToString();
-
-
-
- public static string appId = ConfigurationManager.AppSettings["alipay_appId"].ToString();
-
-
-
- public static string pid = ConfigurationManager.AppSettings["alipay_partnerId"].ToString();
-
-
-
- public static string serverUrl = ConfigurationManager.AppSettings["alipay_serverUrl"].ToString();
- 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";
-
-
- public static string sign_type = "RSA2";
-
- public static string version = "1.0";
-
-
-
-
- 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;
- }
-
-
-
-
- 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;
- }
- }
- }
|