Class Utilities
Utilities class for AuthorizeNet.
Inheritance
System.Object
Utilities
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Business.Commerce.Plugins.Payment.Authorize
Assembly: Mediachase.Commerce.Plugins.Payment.dll
Version: 13.30.0Syntax
public class Utilities
Constructors
Utilities()
Declaration
public Utilities()
Methods
ConvertMoney(Money, Currency)
Converts a given money to a new money value in a given currency.
Declaration
public static decimal ConvertMoney(Money currentMoney, Currency toCurrency)
Parameters
Type | Name | Description |
---|---|---|
Money | currentMoney | The current money. |
Currency | toCurrency | The destination currency to convert to. |
Returns
Type | Description |
---|---|
System.Decimal |
StripPreviewText(String, Int32)
Strips a text to a given length.
Declaration
public static string StripPreviewText(string source, int maxLength)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | The source string. |
System.Int32 | maxLength | Max length of the text. |
Returns
Type | Description |
---|---|
System.String | A shortened version of the given string. |
Remarks
Will return empty string if input is null or empty.
ToAuthorizeNetAddress(IOrderAddress)
Convert an IOrderAddress address to an AuthorizeNet.Address address.
Declaration
public static Address ToAuthorizeNetAddress(IOrderAddress orderAddress)
Parameters
Type | Name | Description |
---|---|---|
IOrderAddress | orderAddress | An IOrderAddress address. |
Returns
Type | Description |
---|---|
AuthorizeNet.Address | An AuthorizeNet.Address adress. |