Example #1
0
        /// <summary>
        /// 获取扫码支付回调返回值
        /// </summary>
        /// <param name="prepay_id"></param>
        /// <param name="config"></param>
        /// <returns></returns>
        public qrCodePayResult GetResult(string prepay_id, config config = null)
        {
            qrCodePayResult value = new qrCodePayResult {
                return_code = returnCode.code.SUCCESS, prepay_id = prepay_id, appid = appid, mch_id = mch_id, nonce_str = nonce_str, result_code = returnCode.code.SUCCESS
            };

            sign <qrCodePayResult> .Set(value, (config ?? config.Default).key);

            return(value);
        }
Example #2
0
        /// <summary>
        /// 获取扫码支付回调返回值
        /// </summary>
        /// <param name="err_code_des">错误代码描述</param>
        /// <param name="config"></param>
        /// <returns></returns>
        public qrCodePayResult GetErrorResult(string err_code_des, config config = null)
        {
            config.PayLog.Add(err_code_des, new System.Diagnostics.StackFrame(), false);
            qrCodePayResult value = new qrCodePayResult {
                return_code = returnCode.code.SUCCESS, err_code_des = err_code_des, appid = appid, mch_id = mch_id, nonce_str = nonce_str
            };

            sign <qrCodePayResult> .Set(value, (config ?? config.Default).key);

            return(value);
        }