go-credit-card-verifier

module
v0.0.0-...-90e23d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: MIT

README

GoLang Dummy Credit Card Verification REST Endpoint System

This is a simple GoLang application that provides a RESTful API for credit card verification. It includes endpoints to perform various operations related to credit card verification, such as validating a credit card number, checking the card type, checking card history, and identify black listed card.

Features

  • Credit Card Validation: Verify the validity of a credit card number using the Luhn algorithm.
  • Credit Card Type Detection: Determine the type of credit card (e.g., Visa, MasterCard, American Express).
  • Black List Bank Card: Record card into black list bank card database.
  • Report Bank Card Activity: Report bank card activity to system and share with public on check.

Language Size

🔨Installation

  1. Clone the Repository:

    git clone https://github.com/cjdriod/go-credit-card-verifier.git
    
  2. Navigate to the Project Directory:

    cd go-credit-card-verifier
    
  3. Build the Application:

    go build -o main
    

⛷️ Run application

With Docker
// Run
docker-compose up -d --build

// Shutdown
docker-compose down -v --rmi all --remove-orphans   
Without Docker
go run .\cmd
With binary file
./main

⚙️ Config Environment Variables

Variable Description Default Value
MYSQL_ACC MySQL account username
MYSQL_PASSWORD MySQL account password
MYSQL_HOST MySQL host
MYSQL_PORT MySQL port 3306
MYSQL_DB_NAME MySQL database name
ENABLE_PREMIUM_CARD_CHECK Enable premium card check false
JWT_SECRET JWT secret key
HTTPS_MODE Enable HTTPS mode true
APP_SERVER_DOMAIN Domain for the application server
APP_SERVER_PORT Port for the application server 8080
GIN_MODE GIN mode for the application debug
ENV Environment mode (Production / Development)

⚔️ Contributing

Contributions are welcome! If you'd like to contribute to this project, please feel free to open a pull request or submit an issue with your suggestions or changes.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

Directories

Path Synopsis
cmd
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL