/// <summary> /// Construct the Payment Device class and open the connection from it. /// </summary> /// <param name="peripheralName">Name of peripheral device.</param> /// <param name="terminalSettings">The terminal settings for the peripheral device.</param> /// <param name="deviceConfig">Device Configuration parameters.</param> /// <returns>A task that can be awaited until the connection is opened.</returns> public Task OpenAsync(string peripheralName, SettingsInfo terminalSettings, IDictionary <string, string> deviceConfig) { this.paymentDevice = new VerifonePaymentDevice(); this.terminalSettings = terminalSettings; return(this.paymentDevice.OpenAsync(deviceConfig)); }
/// <summary> /// Dispose the Native and Managed resources. /// </summary> /// <param name="disposeAll">Whether to dispose both Native and Managed resources.</param> protected virtual void Dispose(bool disposeAll) { if (this.paymentDevice != null) { this.paymentDevice.Dispose(); this.paymentDevice = null; } }