hey again,
I edited this code to my player.java and connected my server to rpay
Code:
public void rspsdata(Player player, String username){
try{
username = username.replaceAll(" ","_");
String secret = "yourkey"; //YOUR SECRET KEY!
String email = "youremail"; //This is the one you use to login into RSPS-PAY
URL url = new URL("http://rsps-pay.com/includes/listener.php?username="+username+"&secret="+secret+"&email="+email);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String results = reader.readLine();
if(results.toLowerCase().contains("!error:")){
//Logger.log(this, "[RSPS-PAY]"+results);
}else{
String[] ary = results.split(",");
for(int i = 0; i < ary.length; i++){
switch(ary[i]){
case "0":
//donation was not found tell the user that!
break;
case "FIRSPRODUCTID": //product ids can be found on the webstore page
//add items for the first product
break;
case "SECONDPRODUCTID": //product ids can be found on the webstore page
//add items for the second product here!
break;
}
}
}
I see that i need to add the product idīs, but where do i need to add the item idīs so the players get their donated items automatically?