Skip to content

jcsix694/afms

Repository files navigation

AFMS

A finance management system which is integrated with OPPWA to create a checkout, payments and issue refunds. This Repository is ysing docker to allow use of Laravel & MySql

For the GUI, please use the following Repository: https://github.com/jcsix694/afms-vuejs

Prerequistes

  • PHP v7.3.33
  • Composer v2.1.3

Getting started

  1. Install prerequisites
  2. Pull down Repository
  3. Run $ composer install
  4. Run npm install
  5. Copy /.env.example and rename to .env
  6. Update DB details in .env to match your local setup
  7. Update OPPWA_API_URL, OPPWA_API_ENTITY_ID and OPPWA_API_ACCESS_TOKEN with the credentials in the .env
  8. Run alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail' to allow to boot up using sail
  9. Run sail up -d to start the project
  10. Run migrations (See Running Migrations)

Running Migrations

  1. Run sail artisan migrate:status to check the migrations to run
  2. Run sail artisan migrate to run the migrations

Other commands

  • Run sail down to stop the project
  • Run sail ps to check containers that are running

Services

  • AFMS API: 80
  • MySQL: 3366
  • Redis: 6379

Endpoints

  • POST api/auth
    • Authorizes a loging and returns a Bearer Token for the user
  • POST api/users
    • Creates a customer
  • GET api/users/me
    • Returns data a user using an active Bearer Token
  • POST api/checkouts
    • Creates a checkout within OPPWA for a user with an active Bearer Token
  • GET api/checkouts
    • Returns all the checkouts with any payments and refunds for a user with an active Bearer Token
  • GET api/checkouts/{id}
    • Returns a single checkout by checkout id with any payments and refunds for a user with an active Bearer Token
  • POST api/payments/refund
    • Creates a refund for a payment for a user with an active Bearer Token

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages