Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Payment Flow Service

Microservice built with Laravel 12 to manage the complete payment lifecycle.

🚀 Features

  • Create payments
  • Update payment status
  • Payment status history audit trail
  • Paginated payment listing
  • Filter by status
  • JSON API Resources
  • Automated tests
  • GitHub Actions CI
  • Enum-based status safety
  • Domain Actions pattern

🧱 Architecture

This project follows a domain-oriented layered architecture:

  • Models → persistence layer
  • Actions → use cases / business rules
  • Enums → status safety
  • Resources → API response contracts
  • Requests → validation layer
  • Feature Tests → endpoint coverage
  • CI Workflow → regression protection

📦 Main Endpoints

Create payment

POST /api/payments

Update status

PATCH /api/payments/{id}/status

List payments

GET /api/payments

Filter by status

GET /api/payments?status=paid

Show payment

GET /api/payments/{id}

⚙️ Running locally

composer install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
php artisan serve

🧪 Run tests

php artisan test

🔄 CI

GitHub Actions runs the full test suite on every push and pull request.


🛠 Tech stack

  • PHP 8.3
  • Laravel 12
  • MySQL
  • SQLite (CI tests)
  • PHPUnit
  • GitHub Actions

📈 Future Improvements

  • Webhook processing
  • Payment retry flow
  • Dead letter queue
  • Async events
  • Docker setup
  • OpenAPI / Swagger docs

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages