Fawry-Like System

This project is a payment system similar to Fawry. It allows users to pay for various services, including mobile recharge, internet payment, landline services, and donations. The system is developed using Java and the Eclipse IDE for Java EE, and it uses Spring Boot as the web framework. Tomcat is used as the application server, and Postman is used for testing the API.

Requirements

User

  1. The user should be able to sign in to the system using their email and password.
  2. The user should be able to sign up for the system by providing a username, email, and password. The system should check if the username or email is already registered, and show an error if either is already in use.
  3. The user should be able to search for any service in the system by typing in the service name. The system should return all services that match the user's query.
  4. The user can pay for any service in the system by filling out a payment form. The default payment method is credit card, but the user should also have the option to pay using their wallet balance (as described in requirement 6). If the service accepts cash on delivery, this option should also be visible.
  5. The user can request a refund for any completed transaction from a service by submitting a request to the admin. If the admin approves the refund, the process should complete successfully.
  6. The system maintains a wallet balance for each user, and the user should be able to add funds to their wallet using a credit card.
  7. The user should be able to check for any discounts available for a particular service. Discounts can be added by the admin (as described in requirement 2b of the Admin section).

Admin

  1. The admin should be able to add new service providers to the system, including a form for the user to fill out and a handler to process the form. The form can consist of any number of text or dropdown fields.
  2. The admin should be able to add discounts to the system, including overall discounts (e.g. a 10% discount for the user's first transaction, regardless of the service) and specific discounts for particular services (e.g. a 20% discount for all mobile recharge services).
  3. The admin should be able to view a list of all user transactions, including payment transactions, wallet transactions, and refund transactions.
  4. The admin should be able to view a list of all refund requests, including the related service and the amount to be refunded. The admin should be able to accept or reject these requests, and if a request is accepted, a refund transaction should be processed.

REST API

In addition to the above functionality, the project also includes a RESTful API to expose the above features as web services. For example, to pay for a service using the API, the user would send a POST request to the /pay endpoint with the necessary payment information in the request body.

Running the Project

To run the project, you will need to have Eclipse IDE for Java EE and the Tomcat plugin installed. You can then import the project into Eclipse and run it on the Tomcat server. The API can be tested using Postman or a similar tool.

Running API in Postman :

  1. Login as admin
  2. apply Cash on specefic Service provider
  3. apply Discount on Specefic Service
  4. Sign out from admin account
  5. Register as user with saved Data
  6. Login as user
  7. Use Payment Method and test cash , Discount

Warning : You have to sign out to change from User/admin mode to avoid mistakes

Dependencies

The project depends on the following libraries:

  • Spring Boot
  • Tomcat (installed as an Eclipse plugin)

JDK Version

This project requires the Java Development Kit (JDK) to build and run. It is recommended to use JDK java 18.0.2.1 when working on this project.

Conclusion

This Fawry-like payment system allows users to pay for various services, including mobile recharge, internet payment, landline services, and donations. It includes a RESTful API for exposing these features as web services and can be run on the Tomcat server using the Eclipse IDE. The project can be further developed to add additional features and service providers, and it requires ongoing maintenance to keep it running smoothly.