Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void rspsdata(Client c, String username){
- try{
- username = username.replaceAll(" ","_");
- String secret = "115f89503138416a242f40fb7d7f338e"; //YOUR SECRET KEY!
- String email = "seanismental@hotmail.co.uk"; //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:")){
- }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;
- }
- }
- }
- }catch(IOException e){}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement