Samsung will pay Apple $548 million in patent dispute