-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.py
33 lines (24 loc) · 998 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
################################################
# main.py #
# Handles the interface with the user. #
# Waits for input and then produces responses. #
# #
################################################
from waparser import *
from checkoutService import *
################################################
# flask #
# Handles interactions over the Internet. #
# #
################################################
from flask import Flask, request, Response
app = Flask(__name__)
@app.route('/wa-webhook', methods=['POST'])
def parseWhatsapp():
parseWhatsappPayload(request.json)
return Response(status=200)
@app.route('/rapyd-webhook', methods=['POST'])
def respondRapyd():
print(request.json)
processCheckoutResult(request.json)
return Response(status=200)