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