This project is used for online paymen.
The project uses h2 as a database.
You need Apache Maven to build the project
mvn clean install
- Clone this repository
https://github.com/Kurmanali1508/payment.git
- Open IntelliJ IDEA and select File > Open....
- Choose the payment directory and click OK.
- Select File > Project Structure and ensure that the Project SDK and language level are set to use Java 11.
- Open Eclipse and select File > Import.
- In the import wizard, choose Maven > Existing Maven Projects, then click Next.
- Select the payment as the project root directory.
- Click Finish to complete the import.
- Select Project > Properties . In Java Build Path, ensure that under the Libraries tab, Modulepath is set to JRE System Library (JavaSE-11). In Java Compiler, ensure that the Use compliance from execution environment 'JavaSE-11' on the 'Java Build Path' checkbox is selected.
- Entities
- Bank
- Client
- Payment
localhost:8080/bank
This api contains all the crud functions for the bank.
localhost:8080/client
Here we can create a client and check the client's requisite
localhost:8080/payment
- In order to make a payment, the client must pass authentication.
- Authentication is implemented with jwt tokens.
- In order to get a jwt token, you need to knock on the api
localhost:8080/authenticate
- If the token is valid, you will authenticate and get access to make the payment.
- If the token is not valid, it will throw an ClientNotFoundException exception.
- You can make a payment and then cancel your payment if necessary.
- Also after the payment you have the opportunity to check the status of your payment.
Statuses in project are implemented as enum.
- If the payment is completed successfully, the status will be SUCCESS.
- If you don't have enough money on your balance, the status will be a FAILED.
- If you canceled the payment, the status will be CANCELLED
The methods in the project are covered by JUnit testing.