HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/TDijk1/erp-apps.eu/wwwroot/App_Code/CMSModules/Ecommerce/GoPay/GopayException.cs
using System;
using System.Collections.Generic;
using System.Text;

namespace CMS.Ecommerce.Gopay
{

    public class GopayException : Exception {
        /// <summary>
        /// Seznam duvodu
        /// </summary>
        public enum Reason {
            OTHER,
            NO_PAYMENT_STATUS,
            INVALID_ON,
            INVALID_GOID,
            INVALID_SIGNATURE,
            INVALID_CALL_STATE_STATE,
            INVALID_SESSION_STATE,
            INVALID_PAYMENT_SESSION_ID,
            INVALID_PN,
            INVALID_PRICE,
            INVALID_CURRENCY,
            INVALID_STATUS_SIGNATURE,
            INVALID_COUNTRY_CODE
        }

        private Reason reason = Reason.OTHER;

        /// <summary>
        /// Vraci duvod vyjimky
        /// </summary>
        /// <returns>duvod</returns>
        public Reason GetReason() {
            return this.reason;
        }

        public GopayException(string message) : base(message) {
        }

        public GopayException(string message, Reason reason) : base(message) {
            this.reason = reason;
        }

        public GopayException(Reason reason) : base(reason.ToString()) {
            this.reason = reason;
        }
    }
}