Skip to content

iliyahristov/emp-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

emp-test

In this test I am using : Spring Boot, Spring MVC, Hibernate and Bootstrap with mariaDB / Mysql

Delete Transactions with cron job

Service is deleting all transactions older then hour at the top of every hour of every day. You can find it in com.ih.schedule.

Import merchants api

You can upload csv file by making POST request to http://localhost:8080/api/merchant/upload with file attachet to the body or by uploading file on http://localhost:8080/registration CSV example is abailable here : /src/main/resources/merchantAndAdminList.csv

Make Payment api

You can make payment with PostMan with XML or JSON POST request to http://localhost:8080/api/transaction/pay with BaseAuth (username and password of some merchant) and body :

JSON :

{
    "amount": 5000,
    "customerEmail": "[email protected]",
    "customerPhone": "+359896644333",
    "referenceId": "1200000039"
}

XML :

<?xml version="1.0" encoding="UTF-8"?>
<transaction>
    <amount>1234</amount>
    <customerEmail>[email protected]</customerEmail>
    <customerPhone>+359896644557</customerPhone>
    <referenceId>1200000034</referenceId>
</transaction>

Keep in mind that the amount is stored as coins (in Integer not Decimal) so if we need to pay 10.20 we need to write in amount 1020.

Refund Payment api

You can refund some transaction by its referenceId with POST to http://localhost:8080/api/transaction/refund/{referenceId} with BaseAuth (username and password of some merchant)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors