Class Transaction
Represents an abstraction of financial operation performed with pay system
Inheritance
System.Object
Transaction
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: NFX.Web.dll
Syntax
[Serializable]
public sealed class Transaction
Constructors
Transaction(Object, TransactionType, TransactionStatus, Account, Account, String, Object, DateTime, Amount, Nullable<Decimal>, String, Object)
Framework-only method. Developer shouldn't call it.
Declaration
public Transaction(object id, TransactionType type, TransactionStatus status, Account from, Account to, string processorName, object token, DateTime createDateUTC, Amount amount, decimal ? fee = default (decimal ? ), string description = null, object extraData = null)
Parameters
Type |
Name |
Description |
System.Object |
id |
Trasaction ID
|
TransactionType |
type |
Trasaction type
|
TransactionStatus |
status |
Transaction Status
|
Account |
from |
Source account
|
Account |
to |
Destination account
|
System.String |
processorName |
Payment processor name which this trasaction belongs to
|
System.Object |
token |
Payment processor trasaction of this trasaction
|
System.DateTime |
createDateUTC |
Creation date of this trasaction
|
Amount |
amount |
Amount of this transaction
|
System.Nullable<System.Decimal> |
fee |
Service fee
|
System.String |
description |
Description of this transaction (e.g. "Payment for CPU Intel i7 4470 SandyBridge")
|
System.Object |
extraData |
Some extra data if needed
|
Properties
Amount
Transaction amount - monetary value and currency code.
Depending on the transaction type can indicate charged amount, refunded amount, transfer amount
Declaration
public Amount Amount { get; }
Property Value
AmountCaptured
Charged amount - monetary value and currency code.
For charge indicates captured amount in two-step charge scenario.
Returns zero for uncaptured charges (created with captured flag set to false).
Returns non-zero amount (typically is equal to original charge amount) for captured amount.
Returns zero for all other transaction types
Declaration
public Amount AmountCaptured { get; }
Property Value
AmountRefunded
Transaction amount - monetary value and currency code.
Indicates refunded amount for charge transaction.
Can be reflected in child refund transactions when explicit refund performed
or can be just reminder of partial capture.
For transactions types other than charge returns zero
Declaration
public Amount AmountRefunded { get; }
Property Value
CanCapture
If this transaction can be captured by value less or equal to its initial amount
Declaration
public bool CanCapture { get; }
Property Value
Type |
Description |
System.Boolean |
|
CanRefund
If this transaction can be refunded by value less or equal to its initial amount
Declaration
public bool CanRefund { get; }
Property Value
Type |
Description |
System.Boolean |
|
CanVoid
Declaration
public bool CanVoid { get; }
Property Value
Type |
Description |
System.Boolean |
|
Date
UTC timestamp of this transaction creation
Declaration
public DateTime Date { get; }
Property Value
Type |
Description |
System.DateTime |
|
Description
Textual transaction description
Declaration
public string Description { get; }
Property Value
Type |
Description |
System.String |
|
Declaration
public object ExtraData { get; }
Property Value
Type |
Description |
System.Object |
|
Fee
Declaration
public Amount Fee { get; }
Property Value
From
Declaration
public Account From { get; }
Property Value
ID
Unique ID for this transaction instance
Declaration
public object ID { get; }
Property Value
Type |
Description |
System.Object |
|
IsVoided
True if transaction was ever voided
Declaration
public bool IsVoided { get; }
Property Value
Type |
Description |
System.Boolean |
|
LeftToCapture
Declaration
public Amount LeftToCapture { get; }
Property Value
LeftToRefund
Declaration
public Amount LeftToRefund { get; }
Property Value
Log
Contains log of operations performed on this transaction
Declaration
public IEnumerable<Transaction.Operation> Log { get; }
Property Value
PaySystem
Declaration
public IPaySystem PaySystem { get; }
Property Value
Processor
The name of pay system implementation system that processes this transaction
Declaration
public string Processor { get; }
Property Value
Type |
Description |
System.String |
|
Status
Declaration
public TransactionStatus Status { get; }
Property Value
To
Declaration
public Account To { get; }
Property Value
Token
A value assigned by a particular pay system implementation.
This value is parsed and understood by issuing system
Declaration
public object Token { get; }
Property Value
Type |
Description |
System.Object |
|
Type
Declaration
public TransactionType Type { get; }
Property Value
Methods
__Apply(Transaction.Operation)
Must be call by PaySystem. Developers do not call internal method
Declaration
public void __Apply(Transaction.Operation operation)
Parameters
Capture(Nullable<Decimal>, String, Object, ConnectionParameters, IPaySessionContext)
Declaration
public bool Capture(decimal ? amount = default (decimal ? ), string description = null, object extraData = null, ConnectionParameters cParams = null, IPaySessionContext context = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Refresh(ConnectionParameters, IPaySessionContext)
Declaration
public bool Refresh(ConnectionParameters cParams = null, IPaySessionContext context = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Refund(Nullable<Decimal>, String, Object, ConnectionParameters, IPaySessionContext)
Declaration
public bool Refund(decimal ? amount = default (decimal ? ), string description = null, object extraData = null, ConnectionParameters cParams = null, IPaySessionContext context = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Void(String, Object, ConnectionParameters, IPaySessionContext)
Declaration
public bool Void(string description = null, object extraData = null, ConnectionParameters cParams = null, IPaySessionContext context = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Extension Methods