Skip to content

ProninIgorr/alif-task-payments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alif-task-payments

Task

Implement the Installment Payments service for a financial institution. This institution has just entered into an agreement with an online electronics store. Depending on the product category, the duration of the installment plan may be different. Installment range: 3-6-9-12-18-24 months. There are only three categories in the online image store with the following installment duration: Smartphone: installment [3-9] months Computer: installment [3-12] months TV: installment [3-18] months For each additional unit of range, 3% will be added for smartphones, 4% for computers and 5% for televisions of the total product. For example, if a customer wants to buy a smartphone with an installment plan for 18 months for 1,000 somoni, the total amount will be 1,060 somoni (1,000 somoni + 6%). Write a function/method where an e-shop sends four parameters to get the total payment amount for a product: product, amount, buyer's phone number, and installment range. Also, after each payment process, an SMS with purchase details will be sent to the customer's phone number.

Built With

  • GORM for DB
  • Docker
  • add driver pgx, so if u want, u can use it instead GORM

Run Locally

Clone the project

  git clone https://github.com/ProninIgorr/alif-task-payments

Go to the project directory

  cd my-project

Start the app

docker-compose up -d

docker-compose exec pgdb psql -U postgres -c "CREATE DATABASE alif_payments"

./run.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published