public int ProcessPayment([FromBody] PaymentDetails Paydetails) { int status = 0; IExpensivepay = new ExpensivePaymentGateway(); IcheapPay = new CheapPaymentGateway(); if (Paydetails.Amount < 20) { status = IcheapPay.Processpayment(Paydetails); } else if (Paydetails.Amount > 20 && Paydetails.Amount <= 500) { status = IExpensivepay.Processpayment(Paydetails); } return(status); }