vpn-btcpay-provisioner/app/__init__.py

19 lines
486 B
Python
Raw Normal View History

2024-12-11 09:05:26 +00:00
from flask import Flask, request, jsonify
import logging
from .handlers.webhook_handler import handle_payment_webhook
# Set up logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
logger = logging.getLogger(__name__)
app = Flask(__name__)
@app.route('/webhook/vpn', methods=['POST'])
def handle_payment():
return handle_payment_webhook(request)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)