return $GLOBALS['wernis_data']['message'];
} elseif (isset($GLOBALS['wernis_data']['status'])) {
// Fall-back to status
- return getMaskedMessage('WERNIS_ERROR_STATUS', $GLOBALS['wernis_data']['status']);
+ return '{%message,WERNIS_ERROR_STATUS=' . $GLOBALS['wernis_data']['status'] . '%}';
} else {
// Something bad happend
return '{--WERNIS_UNKNOWN_ERROR--}';
// Something bad happend... :(
return array(
'status' => 'request_error',
- 'message' => getMaskedMessage('WERNIS_API_REQUEST_ERROR', $response[0])
+ 'message' => '{%message,WERNIS_API_REQUEST_ERROR=' . $response[0] . '%}'
);
} // END - if
logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown error %s from WDS66 API received.", $data[1]));
$return = array(
'status' => 'request_failed',
- 'message' => getMaskedMessage('WERNIS_API_REQUEST_FAILED', $data[1])
+ 'message' => '{%message,WERNIS_API_REQUEST_FAILED=' . $data[1] . '%}'
);
break;
}
// All fine!
$result = true;
} else {
- // Status failture text
+ // Status failure text
WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
}
// Log the transfer
WERNIS_LOG_TRANSFER($wdsId, $amount, 'IN');
} else {
- // Status failture text
+ // Status failure text
WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
// Log the transfer
// Log the transfer
WERNIS_LOG_TRANSFER($wdsId, $amount, 'OUT');
} else {
- // Status failture text
+ // Status failure text
WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
// Log the transfer
// Translate the status IN/OUT
function translateWernisTransferStatus ($status) {
// Default status
- $return = getMaskedMessage('WERNIS_STATUS_UNKNWOWN', $status);
+ $return = '{%message,WERNIS_STATUS_UNKNWOWN=' . $status . '%}';
// Which status?
switch ($status) {
// Log the transfer
function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = '', $status = '') {
// Register this wernis movement
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_wernis` (`userid`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type`,`wernis_api_message`,`wernis_api_status`) VALUES (%s, %s, %s, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_wernis` (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES (%s, %s, %s, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
array(
getMemberId(),
bigintval($wdsId),
return $points;
}
-// ---------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
// Wrapper functions
-// ---------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
// Wrapper function for 'wernis_refid'
function getWernisRefid () {