
    Ph                         d dl Z d dlmZ d Zy)    N)current_appc           
         	 d}dt         j                  d   dt         j                  d   dd| d| t         j                  d	   d
	}t        j                  ||d      }|j	                          |j                         }|j                  d      dk(  rdddS d|j                  dd      dS # t        j                  $ r}ddt        |       dcY d }~S d }~ww xY w)Nz;http://sms.shortmsgservice.com/sms-panel/api/http/index.php
touchindiaSMS_API_KEYTextSMS_SENDER_IDTRANSJSONz, is the OTP to access admin panel at TEAMFUNSMS_TEMPLATE_ID)	usernameapikey
apirequestsenderrouteformatmessagemobile
TemplateID   )datatimeoutstatussuccessTzOTP sent successfully)r   r   Fr   zUnknown error from SMS servicezFailed to send OTP: )	r   configrequestspostraise_for_statusjsongetRequestExceptionstr)	mobile_nootpurlr   responseresultes          -/var/www/html/eduruby.in/utils/sms_service.pysend_smsr)      s    MK$!((7 !((9JK%,,->?

 ==4<!!#::h9,"/FGG#

9Ff0ghh$$ M.B3q6(,KLLMs$   BB, B, ,C?CCC)r   flaskr   r)        r(   <module>r-      s     Mr,   