Giter Site home page Giter Site logo

clickatell's People

Contributors

arcadas avatar arcturial avatar basster avatar dthqb avatar etiennemarais avatar jonnywilliamson avatar petrot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

clickatell's Issues

ClickatellRest - Response is never returned on error

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.

Missing query message by cliMsgId

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,

  1. If you know the apiMessageId, you can use this package.
  2. If you only have your cliMsgId, there's currently no way to query a message status.

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.

Concat parameter for longer than 140 char messages

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.

The sendMessage method returns empty array

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

Api.php - callApi has some issues

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)

Licenses mismatch

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?

Use of `mo` parameter

Hi Guys,

Can i use of mo parameter in the out request?
We need using the below parameters:

mo=1
from=YOURUSLONGNUMBER

'network' should not be a required callback parameter

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).

Problem with transitive dependencies detect

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 ?

Clickatel changed their return message

It looks like Clickatel changed the format of their response. Now, when an error is sent back is is not part of response['messages'].

image

Its harder to catch errors now. I think a good fix is to return the whole $message array. Thoughts?

Can i send send bulk message?

Hi @Jonadabe ,

I'm not sure about this subject, Does the below code is work?

$result = $clickatell->sendMessage(['to' => ['27111111111', '27111111112'], 'content' => 'Message Content']);

Character encoding

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.