public Showcases(IOperationService operationService, ILog logger, string pin, IPaymentType cardPayment, IPaymentType bonusPayment) { this.operationService = operationService; this.logger = logger; var credentials = operationService.AuthenticateByPin(pin); paymentService = new PaymentService(operationService, credentials); cardPaymentType = cardPayment; bonusPaymentType = bonusPayment; }
public static ICredentials GetCredentials([NotNull] this IOperationService operationService) { if (operationService == null) { throw new ArgumentNullException(nameof(operationService)); } try { return(operationService.AuthenticateByPin(Pin)); } catch (AuthenticationException) { PluginContext.Log.Warn("Cannot authenticate. Check pin for plugin user."); throw; } }