Methods summary
public
|
#
__construct( assoc $options = array() )
Constructor
Sets up simple client and client/driver, thus taking any parameters for these
to where any parameters for the driver must be fields of the base field
'httpclient' eg
new HttpSimpleClient(array( 'userkey' => 'k', 'password' => 'p',
'originator' => 'o', 'httpclient' => array('method'=>'POST', .. )
));
Parameters
See
Overrides
|
public
Aspsms\AstractClient
|
#
driver( Aspsms\Request & $request )
Get driver for simple client.
Get driver for simple client.
Parameters
- $request
Aspsms\Request $request
Returns
Aspsms\AstractClient
|
public
array
|
#
getVersion( )
Request: Get Http Service version.
Request: Get Http Service version.
Returns
array Associative array with fields 'all','version','build' and corresponding meaning.
|
public
string
|
#
getStatusDescription( string|integer $statusCode )
Request: Get description to given status code.
Request: Get description to given status code.
Parameters
- $statusCode
string|integer $statusCode
Returns
string
|
public
boolean
|
#
sendMyToken( string $phoneNr, string $reference, string $verificationCode, string $message = '', integer $minutes = 5, boolean $case_sensitive = 0 )
Request: Send a token a predefined token to recipients.
Request: Send a token a predefined token to recipients.
Official doc:
If MessageData is set, the placeholder <VERIFICATIONCODE> will be
substituted with the verification code. If MessageData is not defined, or if
MessageData does not contain the placeholder <VERIFICATIONCODE>, only the
verification code is sent.
Parameters
- $phoneNr
string $phoneNr Recipient phone number
- $reference
string $reference Your reference number
- $verificationCode
string $verificationCode Required verification code to send
- $message
string $message Message to send code with.
- $minutes
integer $minutes Validity of token in minutes (default 5)
- $case_sensitive
boolean $case_sensitive Is given code case sensitive?
Returns
boolean Request success?
|
public
boolean
|
#
sendGeneratedToken( string $phoneNr, string $reference, string $message = '', string $mask = '######', integer $minutes = 5, boolean $case_sensitive = 0 )
Request: Send a token as generated by ASPSMS.COM, optionally give token
mask.
Request: Send a token as generated by ASPSMS.COM, optionally give token
mask.
Official doc:
If MessageData is set, the placeholder <VERIFICATIONCODE> will be
substituted with the verification code. If MessageData is not defined, or if
MessageData does not contain the placeholder <VERIFICATIONCODE>, only the
verification code is sent.
Official doc:
Used to have the ASPSMS generate a verification code by mask. The mask can
contain the following special characters:
# : a digit A : an alphabetic character N : an alphanumeric character
All other characters are taken literally. If not specified, the Mask is "NNNN"
by default.
Parameters
- $phoneNr
string $phoneNr Recipient phone number
- $reference
string $reference Your reference number
- $message
string $message Message to send code with.
- $mask
string $mask Token code mask to use (# -> number, A -> Alphabetical)
- $minutes
integer $minutes Validity of token in minutes (default 5)
- $case_sensitive
boolean $case_sensitive Is given code case sensitive?
Returns
boolean Request success?
|
public
boolean
|
#
validateToken( string $phoneNr, string $reference, string $verificationCode )
Request: attempt to validate token.
Request: attempt to validate token.
NOTE: If a token have been successfully validated, any future attempts (no
matter the verification code use) succeed.
Parameters
- $phoneNr
string $phoneNr Recipient phone number
- $reference
string $reference Your reference number
- $verificationCode
string $verificationCode Required verification code to validate
Returns
boolean Is given verification code for use valid?
|