Thread: Rpay Store codes

Results 1 to 4 of 4
  1. #1 Rpay Store codes 
    Registered Member
    Join Date
    Jan 2016
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    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?
    Reply With Quote  
     

  2. #2  
    mush

    Danny's Avatar
    Join Date
    Sep 2013
    Posts
    1,221
    Thanks given
    38
    Thanks received
    316
    Rep Power
    551
    Code:
    case"FIRSPRODUCTID": //product ids can be found on the webstore page      
    
                        
    //add items for the first product
    
    break;    
    
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2016
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    @-Danny can you make a example pls.. like I should just write the item id there or?
    Reply With Quote  
     

  4. #4  
    The One And Only

    01053's Avatar
    Join Date
    Apr 2011
    Age
    28
    Posts
    2,887
    Thanks given
    417
    Thanks received
    885
    Rep Power
    856
    Quote Originally Posted by Disax View Post
    @-Danny can you make a example pls.. like I should just write the item id there or?
    Code:
    c.getItems().addItem(ID, AMOUNT);


    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Digitified - Digital Key Code Store
    By Cyclanate in forum Selling
    Replies: 0
    Last Post: 12-02-2015, 11:33 PM
  2. Apple Store Gift Code (Worth $50)
    By Kennelz in forum Selling
    Replies: 10
    Last Post: 05-13-2015, 05:35 AM
  3. Storing code to be executed?
    By Rhys in forum Application Development
    Replies: 6
    Last Post: 09-13-2011, 10:36 PM
  4. [PI] General Store Little coding help
    By ARshadow in forum Help
    Replies: 1
    Last Post: 08-18-2011, 08:59 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •