1. Victor Gavro
  2. django-smsgate

Commits

Victor Gavro  committed 53f2174

Added sms_callback to mssgbox_com backend

  • Participants
  • Parent commits 1ef5911
  • Branches default

Comments (0)

Files changed (1)

File smsgate/backends/mssgbox_com/http_v1.py

View file
   session_id = auth()
   for message,recipient_list,remote_id in datatuple:
     yield sendMsg(message,recipient_list,sender,msg_callback=bool(callback_url),session_id=session_id)
+
+def sms_callback(request):
+  if request.method == 'GET': data = request.GET
+  elif request.method == 'POST': data = request.POST
+  remote_id,status = data['uid'],data['status']
+  return remote_id,STATUS_CODES[status][0],STATUS_CODES[status][1]