Skip to content

babaviz/sample-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interview Test

Technology stack used

  1. SpringBoot (java)
  2. Maven
  3. MySQL database

How to run

  1. Update the application properties file on the resources folder to suite your environment
  2. Run mvn install to set up the project dependencies
  3. Run the main class SimpleRestServerApplication.java, this should run smoothly if all dependencies are setup correctly

Rest Server up and running?

Payment notification
  • Endpoint /api/v1/payment

  • Type POST

  • Expects JSON

  • Sample request

    {
        "reference":"WESDTRESFF",
        "channel":"channel",
        "paymentMethod":"AGENT",
        "amount":10000,
        "registrationNumber":"S13/20852/12"
    }
  • Expected success Response

      {
          "error": false,
          "message": "Payment received for S13/20852/12"
      }  
  • Expected Error Response

      {
          "error": true,
          "message": "Error Message"
      }  

    OR Any other html response code other than 200

    What happens

    On receiving a payment notification, the system validates the registration number against the students' enrollment table, then retrieves the student's record to process notifications

    Enjoy :)

About

Simple API REST Server with spring boot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages