Answer the question
In order to leave comments, you need to log in
How do you, experienced people, act in such cases?
This page has api https://turbosms.ua/soap.html There methods return texts. For example, the getStatus method returns the texts "message sent", "failed to send", etc.
The question is how to check the results of message delivery in php? $res = getStatus();
if ($res=='message sent') {...
So?
Or if (substr(... ???
What do you do in such cases when api does not return response codes, but returns texts?
Answer the question
In order to leave comments, you need to log in
What do you do in such cases when api does not return response codes, but returns texts?
especially for such cases in the database, in the status table there should be an additional field that corresponds to the English status with the code of your status cf (for example, sent = sent, etc. if it consists of two words, then the code should be separated by an underscore) . making the status this way will be much easier than checking the Russian text.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question