diff --git a/master/main.py b/master/main.py index edbca2b..8072c5b 100644 --- a/master/main.py +++ b/master/main.py @@ -232,6 +232,26 @@ def tlsa(): return resp.json() + +@app.route('stripe', methods=['POST']) +def stripe(): + # Get API header + api_key = request.headers.get('key') + if api_key == None: + return jsonify({'error': 'Invalid API key', 'success': 'false'}) + if api_key != os.getenv('STRIPE_KEY'): + return jsonify({'error': 'Invalid API key', 'success': 'false'}) + + # Log all requests + print(request.json) + # Log for docker + print(request.json, flush=True) + + return jsonify({'success': 'true'}) + + + + def get_sites_count(): # If file doesn't exist, create it try: