⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notifyeventargs.cs

📁 将淘宝网支付系统嵌入自己系统,学习的好材料!
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Collections;


namespace CommonAliPay
{
	#region DigitalNotify

	/// <summary>
	/// 交易通知信息,包含了虚拟和实物两种信息
	/// </summary>
	public class NotifyEventArgs 
		{
		#region Member Variables
		
            
		
		protected string _notifyType;
		protected string _notifyId;
		protected DateTime? _notifyTime;
		protected string _sign;
		protected string _signType;
		protected string _tradeNo;
		protected string _outTradeNo;
		protected string _paymentType;
		protected string _subject;
		protected string _body;
		protected decimal? _price;
		protected int? _quantity;
		protected decimal? _totalFee;
		protected string _sellerEmail;
		protected string _sellerId;
		protected string _buyerEmail;
		protected string _buyerId;
		protected string _tradeStatus;
		protected string _refundStatus;
		protected string _logisticsStatus;
		protected DateTime? _gmtCreate;
		protected DateTime? _gmtPayment;
		protected DateTime? _gmtSendGoods;
		protected DateTime? _gmtRefund;
		protected DateTime? _gmtClose;
		protected DateTime? _gmtLogisticsModify;
        //实物交易独有
        protected decimal? _discount;
        protected string _useCoupon;
        protected decimal? _couponDiscount;
        protected string _isTotalFeeAdjust;
        protected string _sellerActions;
        protected string _buyerActions;
        protected string _logisticsType;
        protected decimal? _logisticsFee;
        protected string _logisticsPayment;
        protected string _receiveName;
        protected string _receiveAddress;
        protected string _receiveZip;
        protected string _receivePhone;
        protected string _receiveMobile;
		#endregion

		#region Constructors

		public NotifyEventArgs() { }

		public NotifyEventArgs( string notifyType, string notifyId, DateTime? notifyTime, string sign, string signType, string tradeNo, string outTradeNo, string paymentType, string subject, decimal? price, int? quantity, decimal? totalFee, 
            string sellerEmail, string sellerId, string buyerEmail, string buyerId, string tradeStatus,string useConpon,string isTotalFeeAdjust)
		{
			this._notifyType = notifyType;
			this._notifyId = notifyId;
			this._notifyTime = notifyTime;
			this._sign = sign;
			this._signType = signType;
			this._tradeNo = tradeNo;
			this._outTradeNo = outTradeNo;
			this._paymentType = paymentType;
			this._subject = subject;		
			this._price = price;
			this._quantity = quantity;
			this._totalFee = totalFee;
			this._sellerEmail = sellerEmail;
			this._sellerId = sellerId;
			this._buyerEmail = buyerEmail;
			this._buyerId = buyerId;
			this._tradeStatus = tradeStatus;
            this._isTotalFeeAdjust= isTotalFeeAdjust;
            this._useCoupon = useConpon;
		}

		#endregion

		#region Public Properties

	
/// <summary>
/// 
/// </summary>
		public string Notify_Type
		{
			get
            {
                if (_notifyType == null)
                {
                    throw new ArgumentNullException(_notifyType);
                } 
                return _notifyType; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for NotifyType", value, value.ToString());
				_notifyType = value;
			}
		}

		public string Notify_Id
		{
            get
            {
                if (_notifyId == null)
                {
                    throw new ArgumentNullException(_notifyId);
                } return _notifyId;
            }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for NotifyId", value, value.ToString());
				_notifyId = value;
			}
		}

		public DateTime? Notify_Time
		{
            get
            {
                if (_notifyType == null)
                {
                    throw new ArgumentNullException(_notifyType);
                } return _notifyTime;
            }
			set { _notifyTime = value; }
		}

		public string Sign
		{
            get
            {
                if (_sign == null)
                {
                    throw new ArgumentNullException(_sign);
                } return _sign;
            }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Sign", value, value.ToString());
				_sign = value;
			}
		}

		public string Sign_Type
		{
            get
            {
                if (_signType == null)
                {
                    throw new ArgumentNullException(_signType);
                } return _signType;
            }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for SignType", value, value.ToString());
				_signType = value;
			}
		}

		public string Trade_No
		{
            get
            {
                if (_tradeNo == null)
                {
                    throw new ArgumentNullException(_tradeNo);
                } return _tradeNo;
            }
			set
			{
				if ( value != null && value.Length > 64)
					throw new ArgumentOutOfRangeException("Invalid value for TradeNo", value, value.ToString());
				_tradeNo = value;
			}
		}

		public string Out_Trade_No
		{
            get
            {
                if (_outTradeNo == null)
                {
                    throw new ArgumentNullException(_outTradeNo);
                } return _outTradeNo;
            }
			set
			{
				if ( value != null && value.Length > 64)
					throw new ArgumentOutOfRangeException("Invalid value for OutTradeNo", value, value.ToString());
				_outTradeNo = value;
			}
		}

		public string Payment_Type
		{
            get
            {
                if (_paymentType == null)
                {
                    throw new ArgumentNullException(_paymentType);
                } return _paymentType;
            }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for PaymentType", value, value.ToString());
				_paymentType = value;
			}
		}

		public string Subject
		{
            get
            {
                if (_subject == null)
                {
                    throw new ArgumentNullException(_subject);
                } return _subject;
            }
			set
			{
				if ( value != null && value.Length > 256)
					throw new ArgumentOutOfRangeException("Invalid value for Subject", value, value.ToString());
				_subject = value;
			}
		}

		public string Body
		{
			get { return _body; }
			set
			{
				if ( value != null && value.Length > 400)
					throw new ArgumentOutOfRangeException("Invalid value for Body", value, value.ToString());
				_body = value;
			}
		}

		public decimal? Price
		{
            get
            {
               // _price = decimal?.Round(_price, 2);
               return _price;
            }
			set {
                if (value < 0.01m || value > 100000000.00m)
                {
                    throw new ArgumentNullException(_quantity.ToString(), "必须为0.01在100000000.00之间");
                } 
                _price = value;
            }
		}

		public int? Quantity
		{
            get
            {
               
                return _quantity;
            }
			set 
            {
                if (value < 0 || value  > 1000000)
                {
                    throw new ArgumentNullException(_quantity.ToString(), "必须为小于1000000的正整数");
                } 
                _quantity = value;
            }
		}

		public decimal? Total_Fee
		{
            get
            {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -