fooRequestElementBar() functions renamed, adding of request parameters added:
[mailer.git] / inc / libs / primera_functions.php
index 43db5b0138372d6fe56861f22f691530beb821d5..ef6b65c183c4911398d6b9654ba83eb2670ad26f 100644 (file)
@@ -31,7 +31,7 @@
  *     die der Empf�nger erhalten soll. $PayDescription ist eine von Ihnen
  *     festgelegte kurze Beschreibung. Die L�nge dieses Textes darf 100 Zeichen
  *     nicht �berschreiten. Beispiel:
- *       $status = $Interface->payPrimera("garbage", 10000, "Auszahlung IhreSeite.de - ID: 12345");
+ *       $status = $Interface->payPrimera("garbage", 10000, "Auszahlung IhreSeite.de - id: 12345");
  *  3. �berpr�fung des Status (R�ckgabecode):
  *     CODE:
  *       if (!$status) {
@@ -108,7 +108,7 @@ class PrimeraApi {
        var $host = "http://www.primusportal.de";
        var $path = "/transfer.interface.2.0.php";
 
-       var $errno = 0;
+       var $errno = '0';
        var $err = '';
 
        var $seperator = ':';
@@ -236,7 +236,7 @@ class PrimeraApi {
 // is not false the API data is valid, else invalid
 function testPrimeraApi () {
        // Get new instance
-       $api = new PrimeraApi(postRequestElement('primera_api_name'), postRequestElement('primera_api_md5'));
+       $api = new PrimeraApi(postRequestParameter('primera_api_name'), postRequestParameter('primera_api_md5'));
 
        // Was that fine?
        return ($api->getPrimera() !== false);
@@ -257,7 +257,7 @@ function executePrimeraWithdraw ($primusNick, $userMd5, $amount) {
        $api = new PrimeraApi($primusNick, $userMd5);
 
        // Prepare purpose
-       eval("\$purpose = \"".compileCode(sprintf(getMessage('PRIMERA_API_PURPOSE_WITHDRAW'), getSession('sponsorid')))."\";");
+       eval("\$purpose = \"".compileRawCode(getMaskedMessage('PRIMERA_API_PURPOSE_WITHDRAW', getSession('sponsorid')))."\";");
 
        // Pay the Primera
        return $api->payPrimera($primusNick, $amount, $purpose);
@@ -269,7 +269,7 @@ function executePrimeraPayout ($primusNick, $userMd5, $amount) {
        $api = new PrimeraApi(getConfig('primera_api_name'), getConfig('primera_api_md5'));
 
        // Prepare purpose
-       eval("\$purpose = \"".compileCode(sprintf(getMessage('PRIMERA_API_PURPOSE_PAYOUT'), getUserId()))."\";");
+       eval("\$purpose = \"".compileRawCode(getMaskedMessage('PRIMERA_API_PURPOSE_PAYOUT', getMemberId()))."\";");
 
        // Pay the Primera
        return $api->payPrimera($primusNick, $amount, $purpose);