Sign In Register

How can we help you today?

Start a new topic
Answered

Currency Packs

Hello,


I was wondering how Currency Packs are supposed to work? There is very little to no info about them. I would like to use them so players can purchase them using a Hard Currency such as euros and be awarded the in game premium currency. 


-Ali


Best Answer

CurrencyPacks do work the way you expect.  When you purchase them via an IAP and do a receipt validation using, for example, IOSBuyGoodsRequest, then the player will be CREDITED with the currency amounts you specify when configuring the pack.


Confusion might be that you are testing this in the Test Harness using BuyVirtualGoodsRequest which does not do the crediting for you.


Hey Ali,

When setting up a virtual good you get the option under the drop down menu for "Type" to pick a virtual good or a currency pack. You then can assign up to 6 different values.

So an example would be:

Currency 1: 500 Gold coins

Currency 2: 250 Silver coins

Currency 3: 100 bronze coins

Currency 4 : 2 Gems

 

You would assign on the client side what each currency is called and on the GameSparks side they are just known as currency 1-6.


From then on they act similar to a standard virtual good. You would create the good in the IOS store, Google play store etc and just link the product ID in the appropriate field. Once the purchase with real money is made from the relevant store is complete the virtual good or virtual currency will be unlocked on the back end and added to the players values.


Hope this helps. Here is some more documentation on linking virtual goods to the 3rd party stores.


https://docs.gamesparks.net/uncategorized/how-to-do-in-app-purchases


Kind Regards,

Jamie


I do not see the option to add currencies to the player account in the virtual good interface even when setting it to be a currency pack. 

The currencies boxes at the top seems to still behave as a cost (to buy a good/currency-pack using another currency).


I'm not sure what I'm missing.



I too fail to see how this is supposed to work. It seems to behave exactly the same as a normal virtual good (it's even stored in the inventory when you do buy one, which makes no sense).


You can assign a negative number to the specific currency you want to grant, and it somewhat works then, but it's still very un-intuitive. 


At the moment I can see no real practical use for it, and will probably just use a custom event, and cloud code. 

Answer

CurrencyPacks do work the way you expect.  When you purchase them via an IAP and do a receipt validation using, for example, IOSBuyGoodsRequest, then the player will be CREDITED with the currency amounts you specify when configuring the pack.


Confusion might be that you are testing this in the Test Harness using BuyVirtualGoodsRequest which does not do the crediting for you.

Ah, that explains a lot. I assumed the BuyVirtualGoodsRequest and the platform specific BuyGoodsRequest did basically the same, with the addition of receipt validation.


It's not very convenient, now I have to implement Currency Packs in multiple ways, 

- Once for buying Collectible currency with Premium Currency

- Once for buying Premium currency with Money

- Once for buying Premium currency in testing/balancing mode (when it doesn't actually do any app store transactions)


I can kind of see why it is this way now. BuyVirtualGoodsRequest requires you specify which currency you want to use to perform the transaction, but you can't specify which currency you want credited.


Anyway, all sorted now!



The only docs I found for currency packs says this:

Type - Is this a Virtual Good or a Currency Pack.


We can infer that from the type option names. Repeating the obvious isn't really documentation. :P


Please add more information to the documentation. It will take three minutes to update that description with information from this forum thread. I'd do it myself if the docs were a wiki. There are many other places in the docs where important details like this are glossed over or never mentioned.


The best way to learn about GameSparks seems to be by spending hours searching the forums. It's frustrating. And it's a shame, because the service is really great so far, but the weak documentation will drive away a lot of potential customers.


2 people like this

Hi Jason,


We are currently in the process of completely revamping our documentation, listening to our users has been key in this process. The Currency Pack information will definitely be expanded upon and made clearer going forward. If you run into any further issues please don't hesitate to create a forum post or log a ticket, the customer service team will be more than happy to help clarify anything for you.


Thanks,

Liam

So is there any way to test the Currency packs then without setting up a Google Play application etc. 


The API calls needs a signature and signed data (which I assume would contain the google product id to identify the Virtual Good.

This is still very confusing, and the documentation is less than sparse on this.


Here's what I'm trying to do for a game where the player buys tickets. The player buys a single ticket from iOS store for $0.99, or four tickets from iOS store for $1.99. Here's what I think I need to do:


1. Set up a Virtual Currency called COINS

2. Set up two Virtual Goods as Currency Packs: (1) SINGLE_TICKET, (2) 4_TICKETS. For a SINGLE_TICKET, I set the Type as Currency Pack, and Currency Costs as -1 x COINS. For 4_TICKETS, I set the Type as Currency Pack, and Currency Costs as -4 x COINS.

3. Set one more Virtual Good named TICKET as Type = Virtual Good.

4. When user purchases SINGLE_TICKET from iOS store using BuyVirtualGoodsRequest, I think it will add 1 COINS to the Player's profile. My cloud code will immediately spend that one coin on the Virtual Good called TICKET using BuyVirtualGoodsRequest.

5. Similarly, when user purchases 4_TICKETS from iOS store, it should add 4 COINS, and my cloud code will immediately spend all four coins to buy 4 TICKETS.

6. When the player wants to use a TICKET, they consume it using ConsumeVirtualGoodsRequest


Is this the correct approach?


When I try this with the test harness, it fails. 

{
  "@class": ".BuyVirtualGoodsRequest",
  "quantity": 1,
  "shortCode": "SINGLE_TICKET"
}
{
  "@class": ".BuyVirtualGoodResponse",
  "error": {
    "currencyType|currencyShortCode": "SINGLE_PARAM"
  }
}

I tried adding currencyType to the request, but I still get an error:

{
  "@class": ".BuyVirtualGoodsRequest",
  "currencyType": 1,
  "quantity": 1,
  "shortCode": "SINGLE_TICKET"
}
{
  "@class": ".BuyVirtualGoodResponse",
  "error": {
    "virtualGood": "CANNOT_BE_CURRENCY"
  }
}

Can you please give some direction here, or provide some documentation?

Still waiting for a response...I posed this three months ago. Nothing??




1 person likes this

Hi Darren,


It looks like you are trying to buy a virtual good with a custom currency here. In the first instance you didn't supply a default currency (1-6) or a custom currency. You'll need to specify one or the other when buying a good. Currently Currency Packs will only credit to a player when bought via a store request. They can't be bought with custom currencies. We're actually changing our documentation on this very soon. Apologies for the delayed response. If you have any further questions just let me know.


Regards,

Liam

Login to post a comment