Beispiel #1
0
        protected PaySession(PaySystem paySystem, PayConnectionParameters cParams)
        {
            if (paySystem == null || cParams == null)
            {
                throw new PaymentException(StringConsts.ARGUMENT_ERROR + this.GetType().Name + ".ctor(paySystem is not null and cParams is not null)");
            }

            m_PaySystem = paySystem;

            m_Name = cParams.Name;

            m_User = cParams.User;

            lock (m_PaySystem.m_Sessions)
                m_PaySystem.m_Sessions.Add(this);
        }
Beispiel #2
0
        protected PaySession(PaySystem paySystem, ConnectionParameters cParams, IPaySessionContext context = null)
        {
            if (paySystem == null || cParams == null)
            {
                throw new PaymentException(StringConsts.ARGUMENT_ERROR + this.GetType().Name + ".ctor((paySystem|cParams)=null)");
            }

            PaySystem = paySystem;

            Context = context ?? PaySystemHost.GetDefaultTransactionContext();

            ConnectionParameters = cParams;

            lock (PaySystem.Sessions)
                PaySystem.Sessions.Add(this);
        }
Beispiel #3
0
 public void ApplicationStartAfterInit(IApplication application)
 {
     PaySystem.AutoStartSystems();
 }
Beispiel #4
0
 protected PayWebTerminal(PaySystem paySystem)
 {
     PaySystem = paySystem;
 }
Beispiel #5
0
 public bool Refund(decimal?amount = null, string description = null, object extraData = null, ConnectionParameters cParams = null, IPaySessionContext context = null)
 {
     using (var session = PaySystem.StartSession(cParams, context))
         return(session.Refund(this, amount, description, extraData));
 }
Beispiel #6
0
 public bool Void(string description = null, object extraData = null, ConnectionParameters cParams = null, IPaySessionContext context = null)
 {
     using (var session = PaySystem.StartSession(cParams, context))
         return(session.Void(this, description, extraData));
 }
Beispiel #7
0
 public bool Refresh(ConnectionParameters cParams = null, IPaySessionContext context = null)
 {
     using (var session = PaySystem.StartSession(cParams, context))
         return(session.Refresh(this));
 }