Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public void ApplicationStartAfterInit(IApplication application)
 {
     PaySystem.AutoStartSystems();
 }
Exemplo n.º 4
0
 protected PayWebTerminal(PaySystem paySystem)
 {
     PaySystem = paySystem;
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 7
0
 public bool Refresh(ConnectionParameters cParams = null, IPaySessionContext context = null)
 {
     using (var session = PaySystem.StartSession(cParams, context))
         return(session.Refresh(this));
 }