public function MiniorangeCustomerSetup::getCustomerKeys in Google Authenticator / 2 Factor Authentication - 2FA 7
Get Customer Keys.
File
- classes/
CustomerSetup.php, line 84 - Contains miniOrange Customer class.
Class
- MiniorangeCustomerSetup
- @file This class represents configuration for customer.
Code
public function getCustomerKeys() {
$url = MoAuthConstants::getBaseUrl() . MoAuthConstants::$CUSTOMER_GET_API;
$fields = array(
'email' => $this->email,
'password' => $this->password,
);
$json = json_encode($fields);
$response = MoAuthUtilities::callService($this->defaultCustomerId, $this->defaultCustomerApiKey, $url, $json);
if (json_last_error() == JSON_ERROR_NONE && empty($response->apiKey)) {
$error = array(
'%method' => 'getCustomerKeys',
'%file' => 'CustomerSetup.php',
'%error' => $response->message,
);
watchdog('mo_auth', 'Error at %method of %file: %error', $error);
}
return $response;
}