If the customer is not happy with the result and does not accept the product. What would you as a project manager do?

Keeping customers happy is important for the companies. Hence, your answer should showcase that you value customers as well. You can start by explaining that during the course of the project you regularly interact with the customers so that they are on the same page as the project team. Despite this, if the customers are unhappy with the result, say that you will try to clearly understand what modifications they want and try to incorporate them. In case the changes cannot be made, you will try to convince and explain to the customer that the project fits in with the agreed scope.