Not a member yet? Register for your free account!

 

Go Back   elitepvpers > General Stuff > e*pvp News > e*pvp News - EN

 

24h Treasure-lock & TBM API for developers

This is a discussion on 24h Treasure-lock & TBM API for developers within the e*pvp News - EN forum part of the e*pvp News category; Today we have implemented another little Update for elitepvpers' The Black Market. A few weeks ago some members suggested the ...

Reply
 
LinkBack Thread Tools
Old 07-14-2010, 11:46   #1
epvp*Drahtzieher
 
Lowfyr's Avatar
 
Join Date: Jul 2003
Posts: 14,124
Received Thanks: 5,523
24h Treasure-lock & TBM API for developers

Today we have implemented another little Update for elitepvpers' The Black Market.

A few weeks ago some members suggested the idea of a time dependent elite*gold lock to prevent scammers.

As usual we've listened to the voice of the community. From now on all Treasures in The Black Market are locked for 24 hours after they were sold. That means that the seller can't use the elite*gold he received for 24 hours.

So you have enough time to report scamming in the elite*gold support forum to get your elite*gold back.

Furthermore we have added an TBM API for all the developers in our community. After entering a secret word which you should keep secret (Who would have thought it?), you have the possibility to retrieve your transactions in the JSON data format to devolp your own applications (e.g. shop integrations)

Meanwhile some of you will have noticed that we have removed the possibilty of paying with Paypal. We did that because there was more credit card fraud lately.

As an replacement we have integrated MoneyBrookes which have the problem better under control.

If you find errors we are happy about every Bug-Report. You can send us a report in the Complaint Area or direct here in the topic.

Thats it, have a good stay on elitepvpers and much fun with the new features.

Lowfyr is offline  
The Following 7 Users Say Thank You to Lowfyr For This Useful Post:
Adroxxx (07-14-2010), jebus404 (07-14-2010), Solomiyo (07-19-2010), Tamay. (07-14-2010), Tanhel (07-14-2010), Walter Sobchak (07-14-2010), Zacko7 (07-23-2010)
Old 07-14-2010, 12:50   #2
Walter The Death Salter


 
Walter Sobchak's Avatar
 
Join Date: Aug 2008
Posts: 2,983
Received Thanks: 1,671
Blog Entries: 4
A small example, that shows how to use the API with pure JavaScript.

PHP Code:
function CreateXMLHttpRequest()
{
    try 
    {
        
// Mozilla, Opera, Safari sowie Internet Explorer (ab v7)
        
return new XMLHttpRequest();
    } 
    catch(
e
    {
        try 
        {
            
// MS Internet Explorer (ab v6)
            
return new ActiveXObject("Microsoft.XMLHTTP");
        } 
        catch(
e
        {
            try {
                
// MS Internet Explorer (ab v5)
                
return new ActiveXObject("Msxml2.XMLHTTP");
            } 
            catch(
e
            {
                return 
null;
            }
        }
    }
}

var 
transactions;
var 
user_id 'YOURUSERID';
var 
transaction_type 'received'//received, sent or all
var secretword 'YOURSECRETWORD';
var 
transaction_date = new Date();
var 
xmlHttp CreateXMLHttpRequest();

if(
xmlHttp)
{
    
xmlHttp.open('GET''http://www.elitepvpers.de/theblackmarket/api/transactions.php?u=' user_id '&type=' transaction_type '&secretword=' secretwordtrue);
    
xmlHttp.onreadystatechange = function() {
        if(
xmlHttp.readyState == 4)
        {
            
transactions = eval('(' xmlHttp.responseText ')');
            
            if(
transactions.length 0)
            {
                for(var 
0transactions.lengthi++)
                {
                    
transaction_date.setTime(transactions[i]['dateline'] * 1000);
                    
console.log('---------------------------------------------');
                    
console.log('Transaction ID: ' transactions[i]['eg_transactionid']);
                    
console.log('EG Amount: ' transactions[i]['amount']);
                    
console.log('Received From: ' transactions[i]['eg_fromusername'] + '(' transactions[i]['eg_from'] + ')');
                    
console.log('Transation Date: ' transaction_date.toLocaleString());
                }
            }
        }
    };
    
xmlHttp.send(null);



The same example using JavaScript and the jQuery Framework.
PHP Code:
var user_id 'YOURUSERID';
var 
transaction_type 'received'//received, sent or all
var secretword 'YOURSECRETWORD';
var 
transaction_date = new Date();

if(
jQuery)
{
    $.
getJSON('http://www.elitepvpers.de/theblackmarket/api/transactions.php?u=' user_id '&type=' transaction_type '&secretword=' secretword, function(transactions){
       if(
transactions.length 0)
            {
                for(var 
0transactions.lengthi++)
                {
                    
transaction_date.setTime(transactions[i]['dateline'] * 1000);
                    
console.log('---------------------------------------------');
                    
console.log('Transaction ID: ' transactions[i]['eg_transactionid']);
                    
console.log('EG Amount: ' transactions[i]['amount']);
                    
console.log('Received From: ' transactions[i]['eg_fromusername'] + '(' transactions[i]['eg_from'] + ')');
                    
console.log('Transation Date: ' transaction_date.toLocaleString());
                }
            }
    });


Last edited by Walter Sobchak; 07-14-2010 at 13:02.
Walter Sobchak is offline  
The Following 4 Users Say Thank You to Walter Sobchak For This Useful Post:
jebus404 (07-14-2010), Lowfyr (07-16-2010), whitepunk12 (08-02-2010), Zacko7 (07-23-2010)
Old 07-31-2010, 21:27   #3
Member
 
archlord0000's Avatar
 
Join Date: Sep 2009
Posts: 81
Received Thanks: 62
walter is right
archlord0000 is offline  
Reply

Tags
tbm

Thread Tools




All times are GMT +2. The time now is 09:27.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0