I tried running PayVault on Dev server with this code:
- Code: Select all
PayVault vault = player.PayVault;
vault.Credit( 1000, "Just 4 Fun LOL",
delegate( )
{
}
);
vault.Buy(true, new BuyItemInfo[]{new BuyItemInfo("TestItem")},
delegate()
{
Console.WriteLine( "Vault: " + vault );
int boosts = vault.Count( "TestItem" );
//Show new number of boosts to user.
Console.WriteLine( "Boosts: " + boosts.ToString( ) );
}
);
As I'm running a free account I expected it to say sth like "Cannot access payvault on free package" or such, but instead it threw an error about a null-reference. I barely believe its my code because I took it from the documentation.
My guess is that "player.PayVault" will always return null on a free package. But it was irritating to get that error at the first time though.
Anyways, here my suggestion:
How about enabling Developers to use the PayVault API in the development server (since in my case I am making a game then publish it and then wanting to put items for Coins in it and so I would really like to be able to experiment with the API to get a feeling for it rather than having to implement it from scratch after upgrading my package...) so they can get a feeling for it and when you publish your game to the live servers quietly disabling all the calls to the PayVault API on the server, or not and forcing the developer to comment them out. But still, it would be really nice to be able to experiment a little with that new part of the API
Best regards