public virtual IInvoiceBuilder SetGatewayType(Type gatewayType) { GatewayHelper.IsGateway(gatewayType, throwException: true); _gatewayType = gatewayType; return(this); }
/// <inheritdoc /> public virtual IGateway Provide(Type gatewayType) { GatewayHelper.IsGateway(gatewayType, throwException: true); var gateway = _services.GetService(gatewayType); if (gateway == null) { throw new GatewayNotFoundException(GatewayHelper.GetNameByType(gatewayType)); } return((IGateway)gateway); }