Code Monkey home page Code Monkey logo

vonage-php-sdk-core's People

Contributors

ankurk91 avatar arubacao avatar ash-jc-allen avatar crynobone avatar derickr avatar dominic-ks avatar dragonmantank avatar driesvints avatar erickskrauch avatar footballencarta avatar gy741 avatar lornajane avatar mheap avatar pgrimaud avatar sbine avatar secondejk avatar sergkeim avatar softcreatr avatar starfox64 avatar stronglab avatar szepeviktor avatar testing989 avatar thiagolcks avatar timcraft avatar tjlytle avatar ursuleacv avatar vinayak42 avatar vinkla avatar vladrusu avatar yosatak 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  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  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

vonage-php-sdk-core's Issues

Fatal error: Class 'Nexmo\Client\Credentials\Basic' not found

Hi, I am very new in this integration. i don't how to implement. I was looking for web api but i don't how to handle it.
I have downloaded nexmo php library and following as mentioned in document. can anyone guide me with easy simple steps.

I need to integrate simply but it is showing class not found fatal error . please help me in this. thanks in advance,

::class is not valid

Using class as a name of a constant is available in PHP 5.5 only.

Here is the example of the error message:

exception 'yii\base\ErrorException' with message 'syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'' in
/www/my/vendor/nexmo/client/src/Message/Client.php:154

So it's better to change ::class to get_class()

Add User-Agent Header to requests

Hands up - I only did a quick search in the source via the GitHub search. But it didn't show User-Agent in there.

As per the spec we want to use this header to track usage of the library.

Currently Tied to the HTTPlug Guzzle Adaptor

For ease of installation, the HTTPlug Guzzle 6 adapter is in require. You can certainly add another adapter and use that when creating the client, but that leaves unused code under /vendor and provides no good way to remove the Guzzle dependency if there's some version conflict (say another package using Guzzle 5).

Not having any adapter required would mean installation took two commands (with the first replaceable by another adaptor):

composer require php-http/guzzle6-adapter
composer require nexmo/client

Is that an issue? Could a composer hook be used to interactively prompt for an adaptor if one doesn't exist?

Change references of Shared Secret to Signature Secret

It's possible that the API Secret and Shared Secret could be confused. Signature Secret defines exactly what that secret is used for; for signing and for checking signatures.

We could call is request signature secret to be event clearer?

custom parameter in answer url for voice api

Hi Team,
I am using Nexmo for sending sms and text-to-speech voice call.
everything is working fine but I need to add custom parameter in answer url json for voice api.

please check below code:

$call = $client->calls()->create([
'to' => [[
'type' => 'phone',
'number' => '919619666397'
]],
'from' => [
'type' => 'phone',
'number' => '919619666397'
],
'answer_url' => ['https://www.efundbook.com/efb_nexmo/interest.json'],
]);

In above code, there static json file in answer_url.
Any time I execute the code it says same speech on voice call.

I need to change speech dynamically.

can I use php file for 'answer_url' that will echo custom json out put. so that my voice api will say hello with customer name.
basically i need to change json text dynamically .

Please help me to get this done, thanks in advance.

Unicode + SMS in Laravel

Migrated from #8
cc @Asxer


@mheap Hello! I'm trying to send emoji in sms. I upgraded this package and nexmo/laravel package to 1.0.0 version. I try to call example above

$nexmo = app(\Nexmo\Client::class);

$nexmo->message()->send([
    'type' => 'unicode',
    'to'   => $phone,
    'from' => config('nexmo.from'),
    'text' => '๐Ÿ‘'
]);

As result i got many ?? symbols instead of emoji and non-latin symbols. Could you please explain how can i fix it?

php version 5.6.30-0+deb8u1

How to list account numbers?

Is it possible to use the client to list numbers associated with an account.

There seems to be a:

$client->numbers()->get($pattern);

But this searches for numbers based on a querystring and does appear to support list/get.

Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 60: SSL certificate problem: unable to get local issuer certificate

Please help , im new to this
I google search for some solution , and i found that i need to download cacert.pem into my file ssl
but it doesnt seem to work .
here is my full description of the error when i try to run send.php :
Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in C:\xampp\htdocs\nexmo\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187 Stack trace: #0 C:\xampp\htdocs\nexmo\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 C:\xampp\htdocs\nexmo\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlMultiHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 C:\xampp\htdocs\nexmo\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(180): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlMultiHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 C:\xampp\htdocs\nexmo\vendor\guzzle in C:\xampp\htdocs\nexmo\vendor\php-http\guzzle6-adapter\src\Promise.php on line 135

Invalid parameter found: null

Hi,
I am using nexmo-laravel package in my application. When I try to call \Nexmo::verify()->trigger($verification_code) where $verificaiton_code is a valid code returned from \Nexmo::verify()->start() I get Invalid parameter found: null exception with status code 3 from vendor\nexmo\client\src\Verify\Client.php:158 which I believe returns whatever error_text and status is returned from Nexmo API. However, I do receive a call with the verification code.

Can someone help me out.

php api 500 error

in my local server i did all the instructions that appear in github and it's worked great.
but now when i moved it to my cloud server it's give me
500 - Internal server error.
you can see it here
http://control-center.perspective-media.me/modules/sms/examples/send.php
I copy all my php folder from local to cloud so it's the same setting and the same files
just for the testing i gave all permission to the sms folder.
i tried everything and i don't get nothing.
the only thing that i get in error log:
PHP Warning: PHP Startup: pthreads: Unable to initialize module
Module compiled with module API=20151012
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
please heip

Set callback url?

Hi,

I wanted to set a callback url using your library when sending a sms like this:

$client = new Nexmo\Client(new Nexmo\Client\Credentials\Basic(API_KEY, API_SECRET));            
$text = new \Nexmo\Message\Text(NEXMO_TO, NEXMO_FROM, 'Test message using PHP client library');
$text->setCallback($whateverurl);

That method is currently missing.
I added this method to the Message class and it's working:

    public function setCallback($callback) {
        return $this->setRequestData('callback', (string) $callback);
    }

Don't know if there is a reason why this method is missing or maybe the setCallback url can be done other way.

does not handle POST/JSON, only POST or GET

Hi,

In dashboard nexmo settings we can set API Settings HTTP Method to "POST-JSON" but the nexmo-php library does not handle this type.
I did not find this limitation in documentation.

To had this feature just case on "content-type" like with "POST-JSON" it has value "application/json;charset=UTF-8". Should I purpose a PR or not ?

Cheers.

testing github issues by Lisa

This Github issue is synchronized with Zendesk,

Zendesk ticket ID: 57847
Priority:
Zendesk assignee: Support/Phil Holcombe

Original ticket content:

The website is not working properly.

Composer and Prestashop 1.7

I'm having trouble to install Nexmo client using composer with Prestashop 1.7 installation:

composer require nexmo/client:@beta
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: don't install nexmo/client 1.0.0
- Conclusion: don't install nexmo/client 1.0.0-beta4
- Conclusion: don't install nexmo/client 1.0.0-beta3
- Conclusion: don't install nexmo/client 1.0.0-beta2
- Conclusion: don't install nexmo/client 1.0.0-beta1
- Conclusion: don't install nexmo/client 0.4.0
- Conclusion: remove guzzlehttp/guzzle 5.3.1
- Installation request for nexmo/client @beta -> satisfiable by nexmo/client[0.3.0, 0.4.0, 1.0.0, 1.0.0-beta1, 1.0.0-beta2, 1.0.0-beta3, 1.0.0-beta4].
- Conclusion: don't install guzzlehttp/guzzle 5.3.1
- nexmo/client 0.3.0 requires php-http/client-implementation ^1.0 -> satisfiable by php-http/guzzle6-adapter[v1.0.0, v1.1.0, v1.1.1].
- php-http/guzzle6-adapter v1.0.0 requires guzzlehttp/guzzle ^6.0 -> satisfiable by guzzlehttp/guzzle[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0].
- php-http/guzzle6-adapter v1.1.0 requires guzzlehttp/guzzle ^6.0 -> satisfiable by guzzlehttp/guzzle[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0].
- php-http/guzzle6-adapter v1.1.1 requires guzzlehttp/guzzle ^6.0 -> satisfiable by guzzlehttp/guzzle[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0].
- Can only install one of: guzzlehttp/guzzle[6.0.0, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.0.1, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.0.2, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.1.0, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.1.1, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.2.0, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.2.1, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.2.2, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.2.3, 5.3.1].
- Can only install one of: guzzlehttp/guzzle[6.3.0, 5.3.1].
- Installation request for guzzlehttp/guzzle (locked at 5.3.1) -> satisfiable by guzzlehttp/guzzle[5.3.1].

Installation failed, deleting ./composer.json.

is not an array in

array_merge(): Argument #2 is not an array in .....src\Message\Message.php on line 61

this is very important to me

hello man
threre is a very important question to me
i wan to know the nexmo'limit when i send sms and call
1000/day ? or other ?
can you tell me the limit
and what will happens to me
when i reachethe limit

Wrong behavior with 429 error.

If i got 429 error, then i got response like
<!DOCTYPE html><html><head><title>Error report</title></head><body><h1>HTTP Status 429 - message has too many concurrent requests per 1 second</h1></body></html>.
But Client parse it as JSON and got NULL value in
$data = json_decode($response->getBody()->getContents(), true);
Next Client check it and got error
if(!$data){ throw new Exception\Request('no message found for' . $id . ''); }
, but its wrong error, and i cant catch it by himself.
All it in Nexmo\Message\Client.

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.