Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. public void rspsdata(Client c, String username){
  2. try{
  3. username = username.replaceAll(" ","_");
  4. String secret = "115f89503138416a242f40fb7d7f338e"; //YOUR SECRET KEY!
  5. String email = "seanismental@hotmail.co.uk"; //This is the one you use to login into RSPS-PAY
  6. URL url = new URL("http://rsps-pay.com/includes/listener.php?username="+username+"&secret="+secret+"&email="+email);
  7. BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
  8. String results = reader.readLine();
  9. if(results.toLowerCase().contains("!error:")){
  10.  
  11. }else{
  12. String[] ary = results.split(",");
  13. for(int i = 0; i < ary.length; i++){
  14. switch(ary[i]){
  15. case "0":
  16. //donation was not found tell the user that!
  17. break;
  18. case "FIRSPRODUCTID": //product ids can be found on the webstore page
  19. //add items for the first product
  20. break;
  21. case "SECONDPRODUCTID": //product ids can be found on the webstore page
  22. //add items for the second product here!
  23. break;
  24. }
  25. }
  26. }
  27. }catch(IOException e){}
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement