main: Initial stripe test
This commit is contained in:
parent
71a5dd8b45
commit
937620e86c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user