]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/wernis_functions.php
It is Bitcoins, not BitCoins
[mailer.git] / inc / libs / wernis_functions.php
index b28bc9ee2d8efdb18c77445b69e2e2b3dae5830a..0c64af809eff91ccdefabad3ac666073139d8c68 100644 (file)
@@ -111,7 +111,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
        $response = sendPostRequest($requestString, $requestData);
 
        // Check the response header if all is fine
-       if (strpos($response[0], '200') === false) {
+       if (!isInString('200', $response[0])) {
                // Something bad happend... :(
                return array(
                        'status'  => 'request_error',
@@ -335,7 +335,7 @@ function translateWernisTransferStatus ($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),
@@ -349,10 +349,10 @@ function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = '',
 // Take fees and factor
 function WERNIS_TAKE_FEE ($points, $mode) {
        // Payout or withdraw are allowed modes!
-       //* DEBUG: */ debugOutput('mode='.$mode.',points='.$points);
+       //* DEBUG: */ debugOutput('mode=' . $mode . ',points=' . $points);
        if (!in_array($mode, array('payout', 'withdraw'))) {
                // Log error and abort
-               logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . getMemberId() . ',mode=' . $mode . ',points=' . $points);
+               logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . getMemberId() . ',mode=' . $mode . ',points=' . $points . ' - unknown mode detected.');
                return false;
        } // END - if