Permalink
Browse files

Need to pass as a string in PHP

  • Loading branch information...
1 parent ef6ef21 commit a03d81f7fa1a5354f9b287c6f6f89161bf7f73d8 Mike Carson committed Oct 17, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 README.md
  2. +2 −2 lib/Authy/Api.php
  3. +2 −2 tests/Authy/ApiTest.php
View
@@ -100,7 +100,7 @@ Once again you can use `ok()` to verify whether the token was valid or not.
If you wish to verify tokens even if the user has not yet complete registration, pass force=true when verifying the token.
- $verification = $authy_api->verifyToken('authy-id', 'token-entered-by-the-user', array("force" => true));
+ $verification = $authy_api->verifyToken('authy-id', 'token-entered-by-the-user', array("force" => "true"));
## Requesting SMS Tokens
To be able to use this method you need to have activated the SMS plugin for your Authy App.
@@ -113,7 +113,7 @@ As always, you can use `ok()` to verify if the token was sent.
This call will be ignored if the user is using the Authy Mobile App. If you still want to send
the SMS pass force=>true as an option
- $sms = $authy_api->requestSms('authy-id', array("force" => true));
+ $sms = $authy_api->requestSms('authy-id', array("force" => "true"));
### More…
View
@@ -71,7 +71,7 @@ public function registerUser($email, $cellphone, $country_code = 1)
*
* @param string $authy_id User's id stored in your database
* @param string $token The token entered by the user
- * @param string $opts Array of options, for example: array("force" => true)
+ * @param string $opts Array of options, for example: array("force" => "true")
*
* @return Authy_Response the server response
*/
@@ -89,7 +89,7 @@ public function verifyToken($authy_id, $token, $opts = array())
* Request a valid token via SMS.
*
* @param string $authy_id User's id stored in your database
- * @param string $opts Array of options, for example: array("force" => true)
+ * @param string $opts Array of options, for example: array("force" => "true")
*
* @return Authy_Response the server response
*/
View
@@ -48,14 +48,14 @@ public function testVerifyTokenWithInvalidToken() {
}
public function testRequestSmsWithInvalidUser() {
- $sms = $this->client->requestSms(0, array("force" => true));
+ $sms = $this->client->requestSms(0, array("force" => "true"));
$this->assertEquals(false, $sms->ok());
}
public function testRequestSmsWithValidUser() {
$user = $this->client->registerUser('user@example.com', '305-456-2345', 1);
- $sms = $this->client->requestSms($user->id(), array("force" => true));
+ $sms = $this->client->requestSms($user->id(), array("force" => "true"));
$this->assertEquals(true, $sms->ok());
//$this->assertEquals("is not activated for this account", $sms->errors()->enable_sms);

0 comments on commit a03d81f

Please sign in to comment.