Service for handling all payment related operations
Functionality | REST Endpoint | Parameter | Body | Response |
---|---|---|---|---|
Make Payment | POST /makePayment |
JSON String | JSON String | |
Accept Response from Payment Gateway | POST /paymentResponse |
Redirect Response |
Edit the properties of application.yml file
# Eureka properties
eureka:
client:
fetch-registry: true
register-with-eureka: true
service-url:
defaultZone: address of the eureka server (Eg: http://localhost:8761/eureka)
instance:
hostname: specify the hostname of service here (Eg: localhost)
# Server properties
server:
port: port in which the payment service is to be run (Eg: 8093)
# Application properties
spring:
application:
name: name of the application (Eg: PAYMENT-SERVICE)
Service Registry should be started for successful execution of all queries.
In application.yml file, change the properties
Property | Value | Example |
---|---|---|
eureka_hostname | hostname of eureka server | service-registry |
service_hostname | hostname of service (try to use the same as in docker-compose) | payment-service |
Create docker bridge network: docker network create -d bridge pigihi-network
docker-compose can be used to run the application and the corresponding mongodb instance
- Go to project folder
- Open terminal and run
docker-compose up
- The application can be accessed at localhost:8093 (port 8093 is set in docker-compose)
To run only the application
- Go to project folder
- Open terminal and run
docker build .
- Run
docker run -p 8093:8093 docker_image_name
- The application can be accessed at localhost:8093
MongoDB should be run seperately and the configurations should be updated in application.yml
- Go to project folder
- Open terminal and run
./gradlew build
- Run
./gradlew bootRun