Class MockSystem
Represents mock payment service (can be used for testing).
Mock provider is driven by card pool configured in 'accounts" section (see sample config in ExternalCfg.LACONF)
Inheritance
System.Object
MockSystem
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 sealed class MockSystem : PaySystem, IApplicationComponent, IDisposable, IService, ILocalizedTimeProvider, IWebClientCaller, IPaySystemImplementation, IPaySystem, INamed, IConfigurable, IInstrumentable, IExternallyParameterized
Constructors
MockSystem(String, IConfigSectionNode)
Declaration
public MockSystem(string name, IConfigSectionNode node)
Parameters
MockSystem(String, IConfigSectionNode, Object)
Declaration
public MockSystem(string name, IConfigSectionNode node, object director)
Parameters
Fields
CONFIG_ACCOUNT_DATA_NODE
Declaration
public const string CONFIG_ACCOUNT_DATA_NODE = "account-data"
Field Value
Type |
Description |
System.String |
|
CONFIG_ACCOUNTS_SECTION
Declaration
public const string CONFIG_ACCOUNTS_SECTION = "accounts"
Field Value
Type |
Description |
System.String |
|
Properties
AccountsCfg
Declaration
[Config("accounts")]
public IConfigSectionNode AccountsCfg { get; set; }
Property Value
ComponentCommonName
Declaration
public override string ComponentCommonName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
WebTerminal
Declaration
public override IPayWebTerminal WebTerminal { get; }
Property Value
Overrides
Methods
DoCapture(PaySession, Transaction, Nullable<Decimal>, String, Object)
Declaration
protected override bool DoCapture(PaySession session, Transaction charge, decimal ? amount = default (decimal ? ), string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
PaySession |
session |
|
Transaction |
charge |
|
System.Nullable<System.Decimal> |
amount |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
DoCharge(PaySession, Account, Account, Amount, Boolean, String, Object)
Declaration
protected override Transaction DoCharge(PaySession session, Account from, Account to, Amount amount, bool capture = true, string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
PaySession |
session |
|
Account |
from |
|
Account |
to |
|
Amount |
amount |
|
System.Boolean |
capture |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
Overrides
DoRefund(PaySession, Transaction, Nullable<Decimal>, String, Object)
Declaration
protected override bool DoRefund(PaySession session, Transaction charge, decimal ? amount = default (decimal ? ), string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
PaySession |
session |
|
Transaction |
charge |
|
System.Nullable<System.Decimal> |
amount |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
DoStartSession(ConnectionParameters, IPaySessionContext)
Declaration
protected override PaySession DoStartSession(ConnectionParameters cParams, IPaySessionContext context = null)
Parameters
Returns
Overrides
DoTransfer(PaySession, Account, Account, Amount, String, Object)
Declaration
protected override Transaction DoTransfer(PaySession session, Account from, Account to, Amount amount, string description = null, object extraData = null)
Parameters
Returns
Overrides
DoVoid(PaySession, Transaction, String, Object)
Declaration
protected override bool DoVoid(PaySession session, Transaction charge, string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
PaySession |
session |
|
Transaction |
charge |
|
System.String |
description |
|
System.Object |
extraData |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
MakeDefaultSessionConnectParams(IConfigSectionNode)
Declaration
protected override ConnectionParameters MakeDefaultSessionConnectParams(IConfigSectionNode paramsSection)
Parameters
Returns
Overrides
Implements
System.IDisposable
Extension Methods