19 lines
486 B
Python
19 lines
486 B
Python
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) |