コード例 #1
0
ファイル: BLLWeixin.cs プロジェクト: WalkWithWind/HT_HCBSB
        /// <summary>
        /// 微信支付
        /// </summary>
        /// <param name="orderId">订单号</param>
        /// <param name="totalAmount">订单金额</param>
        /// <param name="openId">用户OpenId</param>
        /// <param name="ip">用户IP</param>
        /// <param name="notiUrl">通知Url</param>
        /// <param name="body">订单内容</param>
        /// <param name="tradeType">交易类型</param>
        /// <returns></returns>
        public static WXPayRequest WXPay(string orderId, decimal totalAmount, string openId, string ip, string notiUrl, out bool isSuccess, string body = "", string tradeType = "")
        {
            string appId  = BLLConfig.Get("wx_appid");
            string mchId  = BLLConfig.Get("wx_mchid");
            string mchKey = BLLConfig.Get("wx_mchsecret");

            return(WXApi.GetBrandWcPayRequest(orderId, totalAmount, appId, mchId, mchKey, openId, ip, notiUrl, out isSuccess, body, tradeType));
        }