Go to file
Urko. 760a95c3ba feat: add Dockerfile 2024-02-23 07:55:21 +01:00
cmd/http fix: index css styles 2023-12-26 19:18:19 +01:00
internal feat: upgrade go 1.22 and fiber v3 2024-02-23 07:23:55 +01:00
kit fix: remove unused env var 2023-12-26 12:07:44 +01:00
.gitignore feat: add build commands to makefile 2023-07-19 21:34:00 +02:00
Dockerfile feat: add Dockerfile 2024-02-23 07:55:21 +01:00
LICENSE feat: set up project 2023-07-19 11:47:46 +02:00
Makefile refactor: use external email package 2023-12-26 10:58:26 +01:00
README.md feat: update README 2024-02-23 07:55:09 +01:00
go.mod feat: upgrade go 1.22 and fiber v3 2024-02-23 07:23:55 +01:00
go.sum feat: upgrade go 1.22 and fiber v3 2024-02-23 07:23:55 +01:00

README.md

Bitcoin Payment Checker

Bitcoin Payment Checker is a modern Go application designed to facilitate Bitcoin payments for orders. It provides a seamless interface for clients to pay the Bitcoin equivalent of an order amount, offering a wallet address for payment and tracking the payment status in real-time.

Features

  • Real-time Bitcoin Conversion: Automatically calculates the Bitcoin equivalent of the order amount using current market rates.
  • Order Tracking: Monitors the payment status from initiation to completion, ensuring transparency and reliability.
  • Notification System: Alerts via email when payments are processed or if there are any issues.
  • Secure and Scalable: Designed with security and scalability in mind, making it suitable for businesses of all sizes.
  • Grafana Monitoring: Supports integration with Grafana for advanced monitoring and analytics of payment transactions.

Getting Started

Prerequisites

  • Go (1.15 or later)
  • Docker and Docker Compose (for containerization and services)
  • MongoDB (for database)
  • An SMTP server (for email notifications)
  • Grafana (for monitoring, optional)

Installation

1- Clone the Repository

git clone https://github.com/yourusername/btcpaychecker.git
cd btcpaychecker

2- Environment Configuration

Configure your application by setting the necessary environment variables. You can find a template in .env.example. Rename this to .env and fill in the details accordingly.

3- Build and Run

  • Without Docker: If you prefer to run the application directly on your machine:
go run cmd/btcpaychecker/main.go
  • With Docker: To containerize your application, use the following commands:
docker build -t btcpaychecker .
docker-compose up

Environment Variables

The application can be configured using the following environment variables:

  • DB_ADDRESS: MongoDB address.
  • DB_NAME: Database name.
  • ORDERS_COLLECTION: Collection for orders.
  • CONVERSOR_API: API for currency conversion.
  • RPC_HOST, RPC_AUTH, RPC_ZMQ, WALLET_ADDRESS: Bitcoin service configuration.
  • MAIL_USER, MAIL_PASSWORD, MAIL_HOST, MAIL_PORT, MAIL_FROM: SMTP configuration for email notifications.
  • WEBHOOK_URL: (Optional) For POST callbacks upon payment completion.

Dependencies

List of Go modules and external packages used:

  • gofiber/fiber/v2: For HTTP server and routing.
  • go.mongodb.org/mongo-driver/mongo: MongoDB driver.
  • net/smtp: For sending emails.

Dockerization

A Dockerfile is provided for easy application containerization, allowing for straightforward deployment and scalability. Refer to the Dockerfile for more details.

Contributing

Contributions are welcome! Please refer to the CONTRIBUTING.md file for guidelines on how to contribute to this project.

License

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

Demo

You can try it here on bitcoin testnet