PaymentExtensions
StockSharp.Web.Common
Методы
IsExpired
public static bool IsExpired(DateTime createdUtc, DateTime nowUtc, TimeSpan lifetime)
result = PaymentExtensions.IsExpired(createdUtc, nowUtc, lifetime)
Whether an invoice created then has run out of time by now. The lifetime is the gateway's own: one left unset is refused rather than given a number of ours.
ParseAddresses
public static string[] ParseAddresses(string pool)
result = PaymentExtensions.ParseAddresses(pool)
The addresses a crypto gateway may hand out, in the plain list an operator pastes in.
PickAddress
public static string PickAddress(string pool, IEnumerable<string> busy)
result = PaymentExtensions.PickAddress(pool, busy)
The next address to hand out, or empty when every one of them is already waiting for a payment.
Settles
public static bool Settles(decimal received, decimal expected, DateTime transferUtc, DateTime nowUtc, TimeSpan settling)
result = PaymentExtensions.Settles(received, expected, transferUtc, nowUtc, settling)
Whether a transfer settles the invoice. Anything short of it waits: a chain has no way to ask for the rest, and closing an underpaid invoice is worse than leaving it open. The settling time -- how long a transfer must sit in its block before it counts -- is the gateway's own.