$result = true;
// Log the transfer
- WERNIS_LOG_TRANSFER($wdsId, $amount, 'IN');
+ WERNIS_LOG_TRANSFER($wdsId, $amount, 'WITHDRAW');
} else {
// Status failure text
WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
$result = true;
// Log the transfer
- WERNIS_LOG_TRANSFER($wdsId, $amount, 'OUT');
+ WERNIS_LOG_TRANSFER($wdsId, $amount, 'PAYOUT');
} else {
// Status failure text
WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
// Translate the status IN/OUT
function translateWernisTransferStatus ($status) {
- // Default status
+ // Default status is unknown
$return = '{%message,WERNIS_STATUS_UNKNWOWN=' . $status . '%}';
- // Which status?
- switch ($status) {
- case 'IN': // Withdraw
- $return = '{--WERNIS_STATUS_WITHDRAW--}';
- break;
+ // Construct message id
+ $messageId = 'WERNIS_STATUS_' . $status;
- case 'OUT': // Payout
- $return = '{--WERNIS_STATUS_PAYOUT--}';
- break;
- } // END - switch
+ // Is it there?
+ if (isMessageIdValid($messageId)) {
+ // Then use it as message string
+ $return = '{--' . $messageId . '--}';
+ } // END - if
// Return the status
return $return;