Gift Cards

Test Client

schedule 2 min read

Prerequisites

  • Java 11
  • VueJS
  • Maven
  • Postgres

Project setup

1
2
3
4
5
6
7
8
vas-payment-api-client
├─┬ backend     → backend module with Spring Boot code
│ ├── src
│ └── pom.xml
├─┬ frontend    → frontend module with Vue.js code
│ ├── src
│ └── pom.xml
└── pom.xml     → Maven parent pom managing both modules

First App run

informative

PostgreSQL

The application expects a PostgreSQL server to be running on localhost with a username test and password test to exist.

The username and password for PostgreSQL can automatically be configured if PostgreSQL server is started in Docker with environment variables POSTGRES_USER=test and POSTGRES_PASSWORD=test are set (See docker-compose.yml).

Clone the Payment Client repository from Github.

Inside the root directory, do a:

1
mvn clean install

Run the Spring Boot App:

1
mvn --projects backend spring-boot:run

Now go to http://localhost:8080/ and have a look at your new client.

Testing application

  1. Add a new Merchant with the details provided by Swedbank Pay.
  2. Click on Gift Cards and add a new Gift card.

Build docker image

1
mvn --projects backend clean compile jib:dockerBuild

Deploy to local docker

1
docker-compose up -d