Hey folks...I have a game that is free to play, but gives players access to additional maps and characters if the pay for a "premium" upgrade.
This is a one-time purchase and is working fine. It's fairly simple because it either succeeds or fails, and since it's non-consumable, the customer is free to go through the process as many times as they like and they only ever get charged once. So if my server goes out to lunch, and I fail to record the upgrade...then can simply go through the upgrade process again for free.
In addition to this feature (which is working perfectly right now), I also have a "gift" feature wherein a player can pay for another player to be upgraded to premium status. So if a player one is premium and he invites player two to a game on a premium map, but player two is not a premium player, player one will be advised that player two does not have access to the map and will be offered to buy the upgrade on behalf of player two. This part is a little tricky because it's a different product. Gifts are consumable, so you pay for the gift every time you buy it. If you upgrade 10 of your friends to premium status...then you pay 10 times.
So I need to avoid getting into situations where I process the purchase through the App Store, but then fail to upgrade the user's account due to any number of reasons. The game server being unavailable, player 2 upgrading himself to premium at the same time, for example (I wouldn't want to charge two people for one upgrade), etc.
I'm using the prime[31] Storekit plugin...which is pretty good. But I thought I understood a piece of it, and it turns out that I don't fully understand it.
I thought I could disable autoconfirm and that, similar to a credit card purchase, it would give me an authorization but require me to finalize it later. But seems like that's only for use with StoreKit downloads. This isn't a download per se.
I just want to authorize the payment, update my server (and ensure that the upgrade processes appropriately), then finalize the payment, or cancel the payment if the update on the server fails.
I just don't want to get into a situation where my customer's are pissed off at me because they got charged for upgrades that were not appropriately recorded. Also, I want to build an application that is user-friendly and fails gracefully in bad situations.
Any advice would be greatly appreciated!
Thanks,
--RB
↧