\Pluf\Captcha\EngineReCaptcha

Check google recaptcha

Summary

Methods
Properties
Constants
getType()
getSymbol()
getTitle()
getDescription()
verify()
jsonSerialize()
getParameters()
getGeneralParam()
getExtraParam()
No public properties found
ENGINE_PREFIX
SECRET_DEFAULT
SECRET_ANDROID_DEFAULT
SECRET_KEY
TOKEN_KEY
SECRET_ANDROID_KEY
TOKEN_ANDROID_KEY
getProperty()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ENGINE_PREFIX

ENGINE_PREFIX = 'Engine'

SECRET_DEFAULT

SECRET_DEFAULT = '6LeuFzkUAAAAAEIIggHSQUNlTkiJ8UVXLMsHoH3s' : string

This is our default secret which is an valid google reCAPTCHA secure code.

this is used to test system. You are free to use it as default system captcha system.

SECRET_ANDROID_DEFAULT

SECRET_ANDROID_DEFAULT = '6LcnvlkUAAAAAOfxhviySyLGNH0CEmVV65RL4ZHQ'

SECRET_KEY

SECRET_KEY = 'captcha.engine.recaptcha.secret' : string

Secret key identitifier

TOKEN_KEY

TOKEN_KEY = 'g_recaptcha_response'

SECRET_ANDROID_KEY

SECRET_ANDROID_KEY = 'captcha.engine.recaptcha.android.secret'

TOKEN_ANDROID_KEY

TOKEN_ANDROID_KEY = 'g_recaptcha_android_response'

Methods

getType()

getType() : string

Get type of the engine

Returns

string

getSymbol()

getSymbol() : string

Returns

string

getTitle()

getTitle() : string

Returns

string

getDescription()

getDescription() : string

Returns

string

verify()

verify(\Pluf_HTTP_Request  $request) : boolean

Verify the request

Parameters

\Pluf_HTTP_Request $request

Returns

boolean —

the state of verification

jsonSerialize()

jsonSerialize() 

(non-PHPdoc)

getParameters()

getParameters() 

فهرستی از پارامترهای موتور پرداخت را تعیین می‌کند

هر موتور پرداخت به دسته‌ای از پارامترها نیازمند است که باید توسط کاربر تعیین شود. این فراخوانی پارامترهایی را تعیین می‌کند که برای استفاده از این متور پرداخت باید تعیین کرد.

خروجی این فراخوانی یک فهرست است توصیف خصوصیت‌ها است.

getGeneralParam()

getGeneralParam() : 

فهرست خصوصیت‌های عمومی را تعیین می‌کند.

Returns

getExtraParam()

getExtraParam() 

خصوصیت‌های اضافه را تعیین می‌کند.

getProperty()

getProperty(string  $key, string  $default = NULL) 

Getting property of the captcha engine

Engine can read properties to init the execution of the verification process. The property is read only value and the engine itself are not able to edit.

$secure = parent::getProperty("reCAPTHCA.secureCode");
if($secure == NULL){
throw new \Pluf\Exception("Secure code is not set");
}

Parameters

string $key
string $default