This project is a payment service which is mainly in charge of dealing the order from client, calculating the price and finally return bills to clients. Please help to complete the coding in this project according to the following requirements within 45 minutes.
We total have three kinds of order types: "ONLINE", "OFFLINE". Each order type has its own calculating logic, please help to implement the logic in PaymentService.pay()
;
Order Type | Logic |
---|---|
ONLINE | The total price = origin price * 85% |
OFFLINE | The total price = origin price |
Please help to implement the Junit test case for the PaymentService.pay()
method.