Forum PayVault Giving Paid Access to Multiplayer features

Discussion and help relating to the PlayerIO payment solution, PayVault.

Giving Paid Access to Multiplayer features

Postby ASH1138 » March 1st, 2013, 6:04 am

Hi,

I have a chicken and egg problem. I want users to pay for multiplayer features, but in order to access payVault via serverside, I need to have them connect to a multiplayer room first! :|



Anyway , how can I get players to pay for multiplayer features without connecting to a game room?
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: Giving Paid Access to Multiplayer features

Postby Henrik » March 1st, 2013, 10:23 am

I don't see the problem?

On the client-side you can easily load a user's vault and check what they have access to. Purchases are also initiated on the client-side.

When you say you want users to pay for multiplayer features, that's also not a problem, make the roomtypes that you want to restrict check if each connecting player has access to it, and if you want other functionality running in server-side code, make another roomtype that doesn't check PayVault.
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm

Re: Giving Paid Access to Multiplayer features

Postby ASH1138 » March 1st, 2013, 1:48 pm

Henrik wrote:I don't see the problem?

On the client-side you can easily load a user's vault and check what they have access to. Purchases are also initiated on the client-side.



When you say you want users to pay for multiplayer features, that's also not a problem, make the roomtypes that you want to restrict check if each connecting player has access to it, and if you want other functionality running in server-side code, make another roomtype that doesn't check PayVault.



Ok. But I would like to do it on serverside purely, coz if it was clientside, they may hack and disable the code which checks the payVault.


Not very good at C#. How do you get the player to buy multiplayer rights using C#? Code? :?:
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: Giving Paid Access to Multiplayer features

Postby Henrik » March 1st, 2013, 5:52 pm

ASH1138 wrote:Ok. But I would like to do it on serverside purely, coz if it was clientside, they may hack and disable the code which checks the payVault.

The way to do it is to set up a PayVault item reprresenting "multiplayer access", and check in both places. In the client, you'll just disable multiplayer (and tell the player to upgrade to get it) is they don't have the item, and in the server-side for the multiplayer game roomtype, you do a check in AllowUserJoin if they have the item.

ASH1138 wrote:Not very good at C#. How do you get the player to buy multiplayer rights using C#? Code? :?:

Buy() and GetBuyDirectInfo() are safe to run client-side. Use Buy() if the player can buy it with coins, or GetBuyDirectInfo() to allow them to purchase it directly:

http://playerio.com/documentation/refer ... yvault#buy
http://playerio.com/documentation/refer ... DirectInfo
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm


Return to PayVault



cron