Answer the question
In order to leave comments, you need to log in
How to send SMS securely in PHP?
We send SMS to buyers through the gateway (TurboSMS) using SoapClient. If the gateway is not available (DDOS or preventive maintenance),
the order is not placed, the buyer sees page 500, this is bad.
How to safely send sms without emulating multithreading and creating daemons?
Can somehow ping if there is an answer - we send if not - then we issue the order without SMS? In general, you need a quick working version without claims for the correctness of the architecture and other practices, because. Now everything generally works stupidly, the accessibility check is also simple, that's how to organize it I would be glad to hear. Thank you in advance for your help.
Answer the question
In order to leave comments, you need to log in
If the gateway is not available (DDOS or preventive maintenance),So you have an error in your code that you do not intercept.
the order is not placed, the buyer sees page 500, this is bad
Ну так отправлять запрос и ждать ответ, если не получили - проводим без смс.
Сами всё описали.
Код готовый никто не даст.
Делается очередь (в реляционной БД или nosql). Дальше крон-задача бегает по очереди и пытается отсылать запрос в сервис СМС. Можно реализовать несколько попыток с прогрессивным таумаутом.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question