Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yonatankinfe/yaya-wallet-webhook-implementation
This project implements a webhook endpoint for YaYa Wallet's transaction notification system. It receives transaction notifications, verifies their authenticity, and stores them in a PostgreSQL database.
https://github.com/yonatankinfe/yaya-wallet-webhook-implementation
Last synced: about 2 months ago
JSON representation
This project implements a webhook endpoint for YaYa Wallet's transaction notification system. It receives transaction notifications, verifies their authenticity, and stores them in a PostgreSQL database.
- Host: GitHub
- URL: https://github.com/yonatankinfe/yaya-wallet-webhook-implementation
- Owner: Yonatankinfe
- Created: 2024-10-27T11:44:12.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-27T12:11:05.000Z (2 months ago)
- Last Synced: 2024-10-28T15:22:23.678Z (2 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YaYa-Wallet-Webhook-Implementation
This project implements a webhook endpoint for YaYa Wallet's transaction notification system. It receives transaction notifications, verifies their authenticity, and stores them in a PostgreSQL database.
# Features
+ Webhook endpoint for receiving transaction notifications
+ HMAC SHA256 signature verification
+ Replay attack prevention using timestamp validation
+ PostgreSQL database storage
+ Docker containerization
+ Flask-based REST API
# Prerequisites
+ Docker and Docker Compose
+ Python 3.9+
+ PostgreSQL
# Installation
Clone the repository:bashCopy git clone https://github.com/Yonatankinfe/YaYa-Wallet-Webhook-Implementation
cd YaYa-Wallet-Webhook-ImplementationBuild and run using Docker Compose:
bashCopydocker-compose up --build
The application will be available at http://localhost:5000
# Configuration
Environment variables (set in docker-compose.yml):SECRET_KEY: Secret key for signature verification(i have set my own secret key so change it)
POSTGRES_USER: Change Database user
POSTGRES_PASSWORD: Change Database password
POSTGRES_DB: Chnage Database name
# Implementation Approach## Replay Attack Prevention:
+ Implement 5-minute timestamp tolerance
+ Verify timestamp is part of signature## Database Storage:
+ Use SQLAlchemy ORM for database operations
+ Store all transaction fields
+ Implement proper error handling
# Security Considerations+ Implements signature verification
+ Prevents replay attacks
+ Validates input data