-
Notifications
You must be signed in to change notification settings - Fork 57
Swapped to Vonage namespace #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"require": { | ||
"nexmo/client": "^2.0", | ||
"vonage/client": "^2.3", | ||
"vlucas/phpdotenv": "^2.5" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?php | ||
|
||
$keypair = new \Nexmo\Client\Credentials\Keypair( | ||
file_get_contents(NEXMO_APPLICATION_PRIVATE_KEY_PATH), | ||
NEXMO_APPLICATION_ID | ||
$keypair = new \Vonage\Client\Credentials\Keypair( | ||
file_get_contents(VONAGE_APPLICATION_PRIVATE_KEY_PATH), | ||
VONAGE_APPLICATION_ID | ||
); | ||
|
||
$client = new \Nexmo\Client($keypair); | ||
$client = new \Vonage\Client($keypair); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
|
||
$basic = new \Nexmo\Client\Credentials\Basic(NEXMO_API_KEY, NEXMO_API_SECRET); | ||
$client = new \Nexmo\Client($basic); | ||
$basic = new \Vonage\Client\Credentials\Basic(VONAGE_API_KEY, VONAGE_API_SECRET); | ||
$client = new \Vonage\Client($basic); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<?php | ||
|
||
$basic = new \Nexmo\Client\Credentials\Basic(NEXMO_API_KEY, NEXMO_API_SECRET); | ||
$basic = new \Vonage\Client\Credentials\Basic(VONAGE_API_KEY, VONAGE_API_SECRET); | ||
|
||
$keypair = new \Nexmo\Client\Credentials\Keypair( | ||
file_get_contents(NEXMO_APPLICATION_PRIVATE_KEY_PATH), | ||
NEXMO_APPLICATION_ID | ||
$keypair = new \Vonage\Client\Credentials\Keypair( | ||
file_get_contents(VONAGE_APPLICATION_PRIVATE_KEY_PATH), | ||
VONAGE_APPLICATION_ID | ||
); | ||
|
||
$client = new \Nexmo\Client(new \Nexmo\Client\Credentials\Container($basic, $keypair)); | ||
$client = new \Vonage\Client(new \Vonage\Client\Credentials\Container($basic, $keypair)); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
require_once __DIR__ . '/../config.php'; | ||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
$basic = new \Nexmo\Client\Credentials\Basic(NEXMO_API_KEY, NEXMO_API_SECRET); | ||
$client = new \Nexmo\Client($basic); | ||
$basic = new \Vonage\Client\Credentials\Basic(VONAGE_API_KEY, VONAGE_API_SECRET); | ||
$client = new \Vonage\Client($basic); | ||
|
||
$secret = 'awes0meNewSekret!!;'; | ||
|
||
$client->account()->createSecret(NEXMO_API_KEY, $secret); | ||
$client->account()->createSecret(VONAGE_API_KEY, $secret); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This snippet does not work, and it appears that there's a bug in the SDK causing it to throw a not very helpful error There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is due to that instance bug with the accounts API. This should be fixed in Vonage/vonage-php-sdk-core#248 but hasn't been released yet as we found it right after 2.3.1 was cut. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed this works with v2.3.2 which was just released, but please double-check. |
||
|
Uh oh!
There was an error while loading. Please reload this page.