Class PaySession
Represents session of PaySystem.
All PaySystem operation requires session as mandatory parameter
Inheritance
System.Object
PaySession
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: NFX.Web.dll
Syntax
public abstract class PaySession : DisposableObject, IDisposable, INamed
Constructors
PaySession(PaySystem, ConnectionParameters, IPaySessionContext)
Declaration
protected PaySession(PaySystem paySystem, ConnectionParameters cParams, IPaySessionContext context = null)
Parameters
Fields
ConnectionParameters
Declaration
protected readonly ConnectionParameters ConnectionParameters
Field Value
Context
Declaration
public readonly IPaySessionContext Context
Field Value
PaySystem
Declaration
public readonly PaySystem PaySystem
Field Value
Properties
IsValid
Declaration
public bool IsValid { get; }
Property Value
Type |
Description |
System.Boolean |
|
Name
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
PaySystemHost
Declaration
protected PaySystemHost PaySystemHost { get; }
Property Value
User
Declaration
public User User { get; }
Property Value
Methods
Capture(Transaction, Nullable<Decimal>, String, Object)
Has the same semantics as corresponding PaySystem method executed in context of this session
Declaration
public bool Capture(Transaction tran, decimal ? amount = default (decimal ? ), string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
Transaction |
tran |
|
System.Nullable<System.Decimal> |
amount |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
Type |
Description |
System.Boolean |
|
Charge(Account, Account, Amount, Boolean, String, Object)
Has the same semantics as corresponding PaySystem method executed in context of this session
Declaration
public Transaction Charge(Account from, Account to, Amount amount, bool capture = true, string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
Account |
from |
|
Account |
to |
|
Amount |
amount |
|
System.Boolean |
capture |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
Destructor()
Declaration
protected override void Destructor()
Overrides
FetchAccountData(Account)
Declaration
public IActualAccountData FetchAccountData(Account account)
Parameters
Type |
Name |
Description |
Account |
account |
|
Returns
FetchTransaction(Object)
Declaration
public Transaction FetchTransaction(object id)
Parameters
Type |
Name |
Description |
System.Object |
id |
|
Returns
GenerateTransactionID(TransactionType)
Generates new transaction ID for desired pay session and transaction type (Charge, Transfer).
Context supplies host specific information about this transation i.e. user id
Declaration
public object GenerateTransactionID(TransactionType type)
Parameters
Returns
Type |
Description |
System.Object |
|
Refresh(Transaction)
Has the same semantics as corresponding PaySystem method executed in context of this session
Declaration
public bool Refresh(Transaction tran)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Refund(Transaction, Nullable<Decimal>, String, Object)
Has the same semantics as corresponding PaySystem method executed in context of this session
Declaration
public bool Refund(Transaction tran, decimal ? amount = default (decimal ? ), string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
Transaction |
tran |
|
System.Nullable<System.Decimal> |
amount |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
Type |
Description |
System.Boolean |
|
StoreAccountData(IActualAccountData)
Declaration
public void StoreAccountData(IActualAccountData accoundData)
Parameters
StoreTransaction(Transaction)
Declaration
public void StoreTransaction(Transaction tran)
Parameters
Transfer(Account, Account, Amount, String, Object)
Has the same semantics as corresponding PaySystem method executed in context of this session
Declaration
public Transaction Transfer(Account from, Account to, Amount amount, string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
Account |
from |
|
Account |
to |
|
Amount |
amount |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
VerifyPotentialTransaction(TransactionType, Account, Account, Amount)
Has the same semantics as corresponding PaySystem method executed in context of this session
Declaration
public PaymentException VerifyPotentialTransaction(TransactionType type, Account from, Account to, Amount amount)
Parameters
Returns
Void(Transaction, String, Object)
Has the same semantics as corresponding PaySystem method executed in context of this session
Declaration
public bool Void(Transaction tran, string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
Transaction |
tran |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IDisposable
Extension Methods