Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
message-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 0ae53c9e
authored
2020-08-09 13:58:55 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
validacion de telefonos para argentina en sms
1 parent
3a4472ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
services.py
services.py
View file @
0ae53c9
...
@@ -311,13 +311,13 @@ class SMS(ServiceBase):
...
@@ -311,13 +311,13 @@ class SMS(ServiceBase):
if
type
(
text
)
==
bytes
:
if
type
(
text
)
==
bytes
:
text
=
text
.
decode
(
"utf-8"
)
text
=
text
.
decode
(
"utf-8"
)
try
:
try
:
#response = requests.get(url = SMS.URL, params = {
tel
=
data
[
Table
.
dest
]
# "phone" : data[Table.dest],
v
=
ValidacionTelefonosArgentinos
()
# "message" : text
tel
=
v
.
ValidarTelefono
(
tel
)
#})
if
tel
==
False
:
#print(data[Table.dest], text, info
)
print
(
"Error de numero"
)
#print(stadoSms,text, Table.dest, info["smtp"]["device"], info["smtp"]["sim"],info["smtp"]["email"], info["smtp"]["pass"])
tel
=
"Error"
Sms
.
EnviarSMS
(
stadoSms
,
text
,
data
[
Table
.
dest
],
info
[
"smtp"
][
"device"
],
info
[
"smtp"
][
"sim"
],
info
[
"smtp"
][
"email"
],
info
[
"smtp"
][
"pass"
])
Sms
.
EnviarSMS
(
stadoSms
,
text
,
tel
[
2
:
],
info
[
"smtp"
][
"device"
],
info
[
"smtp"
][
"sim"
],
info
[
"smtp"
][
"email"
],
info
[
"smtp"
][
"pass"
])
success
[
file
]
=
True
if
"OK"
==
"OK"
else
False
success
[
file
]
=
True
if
"OK"
==
"OK"
else
False
except
:
except
:
success
[
file
]
=
False
success
[
file
]
=
False
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment