Table of Contents

Class OrderCaptureInfo

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll
Represents capture information about order.
[Serializable]
public class OrderCaptureInfo
Inheritance
OrderCaptureInfo
Inherited Members

Examples

class MyPage : System.Web.UI.Page
{
public Dynamicweb.eCommerce.Orders.OrderCaptureInfo Capture(Dynamicweb.eCommerce.Orders.Order order)
{
try
{
if (order == null || string.IsNullOrEmpty(order.Id) || string.IsNullOrEmpty(order.TransactionNumber))
{
string errorText = null;
if (string.IsNullOrEmpty(order.TransactionNumber))
{
errorText = "No transaction number set on the order";
}
else
{
errorText = "No valid Order object set";
}
return new Dynamicweb.eCommerce.Orders.OrderCaptureInfo(Dynamicweb.eCommerce.Orders.OrderCaptureInfo.OrderCaptureState.Failed, errorText);
}
string infoText = "Remote Capture succeeded";
return new Dynamicweb.eCommerce.Orders.OrderCaptureInfo(Dynamicweb.eCommerce.Orders.OrderCaptureInfo.OrderCaptureState.Success, infoText);
}
catch (Exception ex)
{
string infoTxt = string.Format("Remote capture for order {0} failed with the message: {1}", order.Id, ex.Message);
return new Dynamicweb.eCommerce.Orders.OrderCaptureInfo(Dynamicweb.eCommerce.Orders.OrderCaptureInfo.OrderCaptureState.Failed, infoTxt);
}
}
}

Constructors

OrderCaptureInfo(OrderCaptureState, string)

Initializes a new instance of the OrderCaptureInfo class.
public OrderCaptureInfo(OrderCaptureInfo.OrderCaptureState state, string message)

Parameters

state OrderCaptureInfo.OrderCaptureState
The capture state.
message string
The message.

Properties

CaptureTime

Gets or sets the capture time.
public DateTime CaptureTime { get; set; }

Property Value

DateTime
The capture time.

Message

Gets or sets the message.
public string Message { get; set; }

Property Value

string
The message.

State

Gets or sets the state.
public OrderCaptureInfo.OrderCaptureState State { get; set; }

Property Value

OrderCaptureInfo.OrderCaptureState
The state.

Methods

Parse(string)

Parses the specified XML settings.
public static OrderCaptureInfo Parse(string xmlSettings)

Parameters

xmlSettings string
The XML.

Returns

OrderCaptureInfo

Examples

class MyPage : System.Web.UI.Page
{
private OrderCaptureInfo _captureInfos;
private void FillCaptureInfos(IDataReader DataReader)
{
_captureInfos = OrderCaptureInfo.Parse(Converter.ToString(DataReader["OrderCaptureInfo"]));
}
}

ToString()

Creates a XML string with the values.
public override string ToString()

Returns

string
The XML.

Examples

class MyPage : System.Web.UI.Page
{
private OrderCaptureInfo _captureInfos;
private string GetCaptureInfos(IDataReader DataReader)
{
_captureInfos = OrderCaptureInfo.Parse(Converter.ToString(DataReader["OrderCaptureInfo"]));
return _captureInfos.ToString();
}
}
To top