Created an endpoint to test how the incoming messages from MMG will work.

So this just prints the response to logs, removing the phone number first. Then returns the requested RECEIVED.
This commit is contained in:
Rebecca Law
2017-03-06 11:58:49 +00:00
parent b89923c525
commit 77f520acba
3 changed files with 28 additions and 0 deletions

View File

@@ -123,6 +123,7 @@ def init_app(app):
url_for('notifications.process_ses_response'),
url_for('notifications.process_firetext_response'),
url_for('notifications.process_mmg_response'),
url_for('notifications.receive_mmg_sms'),
url_for('status.show_delivery_status'),
url_for('spec.get_spec')
]

View File

@@ -49,6 +49,15 @@ from app.errors import (
register_errors(notifications)
@notifications.route('/notifications/sms/receive/mmg', methods=['POST'])
def receive_mmg_sms():
post_data = request.get_json()
post_data.pop('MSISDN', None)
current_app.logger.info("POST form data: {}".format(post_data))
return "RECEIVED"
@notifications.route('/notifications/email/ses', methods=['POST'])
def process_ses_response():
client_name = 'SES'