Beispiel #1
0
        /// <summary>
        /// 格式化自身属性部分
        /// </summary>
        protected override void FormatPropertiesFromMsg()
        {
            device_info  = this["device_info"];
            openid       = this["openid"];
            is_subscribe = this["is_subscribe"];
            trade_type   = this["trade_type"];

            bank_type            = this["bank_type"];
            total_fee            = this["total_fee"].ToInt32();
            settlement_total_fee = this["settlement_total_fee"].ToInt32();
            fee_type             = this["fee_type"];
            cash_fee             = this["cash_fee"].ToInt32();

            cash_fee_type  = this["cash_fee_type"];
            coupon_fee     = this["coupon_fee"].ToInt32();
            coupon_count   = this["coupon_count"].ToInt32();
            transaction_id = this["transaction_id"];
            out_trade_no   = this["out_trade_no"];

            attach   = this["attach"];
            time_end = this["time_end"];

            if (coupon_count > 0)
            {
                coupons = new List <WXPayOrderCouponMo>(coupon_count);
                for (int i = 0; i < coupon_count; i++)
                {
                    var coupon = new WXPayOrderCouponMo();
                    coupon.coupon_fee  = this["coupon_fee_" + i].ToInt32();
                    coupon.coupon_id   = this["coupon_id_" + i];
                    coupon.coupon_type = this["coupon_type_" + i];
                }
            }
        }
        /// <summary>
        /// 格式化自身属性部分
        /// </summary>
        protected override void FormatPropertiesFromMsg()
        {
            device_info    = this["device_info"];
            transaction_id = this["transaction_id"];
            out_trade_no   = this["out_trade_no"];
            out_refund_no  = this["out_refund_no"];
            refund_id      = this["refund_id"];

            refund_channel        = this["refund_channel"];
            refund_fee            = this["refund_fee"].ToInt32();
            settlement_refund_fee = this["settlement_refund_fee"].ToInt32();
            total_fee             = this["total_fee"].ToInt32();
            settlement_total_fee  = this["settlement_total_fee"].ToInt32();

            fee_type          = this["fee_type"];
            cash_fee          = this["cash_fee"].ToInt32();
            cash_fee_type     = this["cash_fee_type"];
            cash_refund_fee   = this["cash_refund_fee"];
            coupon_refund_fee = this["coupon_refund_fee"];

            coupon_refund_count = this["coupon_refund_count"].ToInt32();
            if (coupon_refund_count <= 0)
            {
                return;
            }

            refund_coupons = new List <WXPayOrderCouponMo>(coupon_refund_count);
            for (var i = 0; i < coupon_refund_count; i++)
            {
                var coupon = new WXPayOrderCouponMo();
                coupon.coupon_fee  = this["coupon_refund_fee_" + i].ToInt32();
                coupon.coupon_id   = this["coupon_refund_id_" + i];
                coupon.coupon_type = this["coupon_type_" + i];
            }
        }