arcturial / clickatell Goto Github PK
View Code? Open in Web Editor NEWStandalone PHP library to integrate with the Clickatell SMS gateway.
Home Page: http://www.chrisbrand.co.za
License: MIT License
Standalone PHP library to integrate with the Clickatell SMS gateway.
Home Page: http://www.chrisbrand.co.za
License: MIT License
Problem:
When using ClickatellRest the method sendMessage
returns an empty array when there's an error, instead of the error itself.
Expected Behavior:
The function should return the error information when there's an error.
Actual Behavior:
Errors return an empty array
Tech Details:
In Clickatell\Api\ClickatellRest::sendMessage()
if there's an error, it is is saved to the response, but that is assigned without a message
key. Then when it runs the foreach ($response['message'] as $entry)
loop, the response has no message, so the $return
remains an empty array and that's what's returned. Either the catch should assign a message to the response, or the catch should return response right there in the block.
Do you think we can get separate branches for each of the major versions? Instead of developing on master?
Theres some docs on how Composer reads these versions: https://getcomposer.org/doc/articles/versions.md#branches
Tldr: Currently, you would have two branches: '2.1', and '3.0'
Hi,
Thanks for the package. It appears that there's possibily a missing method for querying a message status.
The docs here state
Query the status of a message
This command enables the user to query both the status and charge of a delivered message.You can query the status with either the 'apimsgid' or 'climsgid'
Endpoint: https://api.clickatell.com/rest/message/[apiMessageId] OR >https://api.clickatell.com/rest/message?clientMessageId=<some_id>
HTTP Method: GET
Notice there are 2 ways to get a message query,
I can either send you a PR with my idea on how to fix it, or you might be more familiar with your code and prefer to implement this in the way you see fit.
At the moment the interface has
/**
* API call for "getMsgCharge".
*
* @param string $apiMsgId ApiMsgId to query
*
* @throws Exception
*
* @return mixed
*/
public function getMessageCharge($apiMsgId);
}
Which isn't really correct, The interface should support either supplying a apiMsgId OR a cliMsgId.
What would you like me to do? Thanks for your help.
Clickatel supports a concat option, this allows the message to span over a certain amount of messages if it exceeds 140 chars, otherwise it will throw an error "Max message parts exceeded". This is rectified by the concat parameter that Clickatell accepts in their API, for example &concat=3 will tell Clickatell to allow it to span over 3 messages.
Your method handle in new api not working.
For example, if clicatell returns an error "Two-Way integration error - You should specify correct from number" I can't get this response.
You check status code but clickatell response 200 status code.
When using sendMessage method I receive empty array although clickatell returned an error.
I saw that such a issue has already been created here, but in the new version it is also present
Sending UTF-8 "ä" results in "A¤".
You build the query string to post manually without encoding. By default a post is url encoded. This means that if you use any character that has special meaning in your text (like a + for example) it will yield weird results.
You can easily fix this by replacing the entire loop with:
$post = http_build_query($packet)
(which also does encoding for you)
Declaration of Clickatell\ClickatellEvent::getMessageCharge() must be compatible with Clickatell\TransportInterface::getMessageCharge($msgId, $cliMsgId = false) in file ...../arcturial/clickatell/src/ClickatellEvent.php on line 28
Is it possible to add support for scheduled delivery please? https://archive.clickatell.com/developers/api-docs/scheduled-delivery-advanced-message-send/
Thanks
Good day, @arcturial
While installing recent version of the plugin I noticed a slight mismatch of licenses in composer.json
and GitHub repo. Composer description uses GNU license, but the repo (including LICENSE file) is under MIT. Which of the licenses will be initially used for the project?
Clickatel accepts a concat param for example concat=3 will tell Clickatel the longer message is allowed to expand over 3 messages.
Hi Guys,
Can i use of mo
parameter in the out request?
We need using the below parameters:
mo=1
from=YOURUSLONGNUMBER
Should we use https://github.com/arcturial/clickatell or https://github.com/clickatell/clickatell-php?
Also link to "issues" on the bottom of readme is broken (since on clickatell/clickatell-php issues are disabled).
Clickatell\Callback\parseMoCallback()
requires the following GET parameters:
api_id
moMsgId
from
to
timestamp
network
text
network is not provided by clickatell on some legitimate callbacks. This is probably because not all numbers have carriers (Google Voice for example).
The required parameters should be user configurable (e.g. a parameter to the parseMoCallback
method).
First of all thanks for the awesome class.
According to the example you can do:
$clickatell = new Clickatell($username, $password, $apiID);
However parameter 4 is is not optional.
Hello. Thanks for the library.
We are using PhpInspectionEA plugin. And it has a nice feature
https://github.com/kalessil/phpinspectionsea/blob/master/docs/architecture.md#transitive-dependencies-usage
It detects libraries that are not directly required in the composer.json
Your library is detected, but it seems to be false positive. I think the reason is the library name.
Why is your library has different names in composer.json and in packagist.
Can you rename it to arcturial/clickatell
in composer.json
?
Hi @Jonadabe ,
I'm not sure about this subject, Does the below code is work?
$result = $clickatell->sendMessage(['to' => ['27111111111', '27111111112'], 'content' => 'Message Content']);
Hey,
Was just wondering if you have any advice for character encoding?
I have a basic install of this package, sending out is all good. However when trying to send out a string contaning umlauts etc, they are not being received how they are sent out. Am i missing something in the setup? Or should i be doing any encoding before?
The example test string is : Hellö its me Päuli from Skötlänti
Thanks in advance for any help, and thanks alot for the package!
Paul
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.