private void GatewayProviderServiceOnSaved(IGatewayProviderService sender, SaveEventArgs <IGatewayProviderSettings> args) { var key = new Guid(Constants.GatewayProviderSettingsKey); var provider = args.SavedEntities.FirstOrDefault(x => key == x.Key && !x.HasIdentity); if (provider == null) { return; } MappingExtensions.SaveProcessorSettings(provider.ExtendedData, new SagePayProcessorSettings()); }