Show / Hide Table of Contents

Class PaySession

Represents session of PaySystem. All PaySystem operation requires session as mandatory parameter

Inheritance
System.Object
DisposableObject
PaySession
BraintreeSession
MockSession
PayPalSession
StripeSession
Implements
System.IDisposable
INamed
Inherited Members
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
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()
Namespace: NFX.Web.Pay
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
Type Name Description
PaySystem paySystem
ConnectionParameters cParams
IPaySessionContext context

Fields

ConnectionParameters

Declaration
protected readonly ConnectionParameters ConnectionParameters
Field Value
Type Description
ConnectionParameters

Context

Declaration
public readonly IPaySessionContext Context
Field Value
Type Description
IPaySessionContext

PaySystem

Declaration
public readonly PaySystem PaySystem
Field Value
Type Description
PaySystem

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
Type Description
PaySystemHost

User

Declaration
public User User { get; }
Property Value
Type Description
User

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
Type Description
Transaction

Destructor()

Declaration
protected override void Destructor()
Overrides
DisposableObject.Destructor()

FetchAccountData(Account)

Declaration
public IActualAccountData FetchAccountData(Account account)
Parameters
Type Name Description
Account account
Returns
Type Description
IActualAccountData

FetchTransaction(Object)

Declaration
public Transaction FetchTransaction(object id)
Parameters
Type Name Description
System.Object id
Returns
Type Description
Transaction

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
Type Name Description
TransactionType type
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
Type Name Description
Transaction tran
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
Type Name Description
IActualAccountData accoundData

StoreTransaction(Transaction)

Declaration
public void StoreTransaction(Transaction tran)
Parameters
Type Name Description
Transaction tran

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
Type Description
Transaction

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
Type Name Description
TransactionType type
Account from
Account to
Amount amount
Returns
Type Description
PaymentException

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
INamed

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX