|
|

Beta has been temporarily closed for newer members as we work towards officially launching. If you wish to obtain access to the beta please send me a PM.

The following code is for elvarg/OSRS PK
Code:} else if(parts[0].startsWith("claim")) { new java.lang.Thread() { public void run() { try { final com.teamgames.gamepayments.GamePaymentsResponse gamepaymentsResponse = com.teamgames.gamepayments.Transaction.getResponse("GamePayment secret key", "Gamepayment username"); com.teamgames.gamepayments.Transaction[] transaction = gamepaymentsResponse.getTransactions(); if (!gamepaymentsResponse.getMessage().equalsIgnoreCase("SUCCESS")) { player.getPacketSender().sendMessage(gamepaymentsResponse.getExtendedMessage()); return; } for (com.teamgames.gamepayments.Transaction transaction1 : transaction) { player.getInventory().add(new Item(Integer.parseInt(transaction1.productId), transaction1.quantity)); } player.getPacketSender().sendMessage("Thank you for donating!"); } catch (Exception e) { player.getPacketSender().sendMessage("Api Services are currently offline. Please check back shortly!"); e.printStackTrace(); } } }.start(); }




i remember when u very first (year+ ago) showed me the screenshots of this, glad its finally out.
Thank you for all the hard work you put into this and for sharing better ways for game payments!

Whats different between this and the previous system everythingrs




Since you had the post removed, I will post it again. You will have to come up with a better way to call the API than in a thread that directly modifies the players information. Perhaps a micro service that checks for payments and updates a database for the server to query against.
| « Basic Discord Chat Bot [Vencillio Base] | 95% 317 above ground ladders » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |