question

psilvestre avatar image
psilvestre asked

Is there invalid RM values on transactions done in Apple Store?

Hi,

we are using receipt validation for Google Play and Apple Store and it works like a charm. The problem that we have encountered is that there is a difference between RM calculated (in USD value) on Apple Store and Google Play for the transaction of the same item.

In receipt validation of Google Play the transactions add the correct RM (that refers to pennies in USD) to the users and appeas in the report correctly. However in receipt validation process of Apple Store, the transactions add an incorrect RM to the users and depending on the real item value set as zero value, so these RM don't appear as bought in reports and the same for analytics.

I add two examples to explain this better:

Product with 99 RM in Catalog: Google Play completed transaction is set as 99 RM ($0.99) but Apple Store completed transaction is set as 0 RM ($0) (so this Apple Store transaction doesn't appear in PlayFab reports)

Product with 3999 RM in Catalog: Google Play completed transaction is set as 3999 RM ($39.99) but Apple Store completed transaction is set as 45 RM ($0.45).

So I think that Apple Store transactions are been resolved with incorrect RM conversion to USD.

Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

One thing to be aware of is that the price isn't actually in the receipt data at all. We get the price one of two ways (in priority order):

1. The currency code and price you state in the receipt validation call. These are required fields for the Apple receipt validation call, so for that platform, you can stop here. Whatever you pass in is what we use. For Google, they're not required - the inconsistency on this is a relic of their initial implementation, and we'll update with a new call for Google in future that will make them required fields.

2. For any platform where the currency code and price aren't required and you don't pass them in, we use the RM price you state in the game catalog, which is in USD pennies (so, 199 RM is $1.99 USD).

5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

psilvestre avatar image psilvestre commented ·

Ok, thank you so much Brendan. I will check it for Apple Store.

0 Likes 0 ·
psilvestre avatar image psilvestre psilvestre commented ·

Sorry @Brendan, I am checking it and I realized another difference refered to PlayFab event history :

For Google Play receipt validation appearse the next events:

  1. player_executed_cloudscript (validateGoogleReceipt)
  2. player_inventory_item_added (refered to item purchased in catalog that has the same id for google play store)
  3. player_virtual_currency_balance_changed (optional because our item has vc added)
  4. player_receipt_validation (with receipt content and validation data)
  5. player_realmoney_purchase (with content of payment provider and quantity)

However for Apple Store receipt validation appearse the next events:

  1. player_inventory_item_added (refered to item purchased in catalog that has the same id for apple store)
  2. player_virtual_currency_balance_changed (optional because our item has vc added)

So I miss validateIOSReceipt before add the item to inventory and after that player_receipt_validation and player_realmoney_purchase. The purchase is completely added to user so... why it is happening?

Thanks.

0 Likes 0 ·
brendan avatar image brendan psilvestre commented ·

So, "validateGoogleReceipt" is a handler in your Cloud Script. I see no "validateIOSReceipt" handler in your script, so there appears to be no way that player_executed_cloudscript event could happen in your Apple receipt flow.

Next, any successful call to ValidateIOSReceipt will generate the player_receipt_validation event and player_realmoney_purchase event, if there's a valid receipt. So in your Apple flow, no call is being made to our receipt validation.

0 Likes 0 ·
Show more comments
psilvestre avatar image psilvestre commented ·

Ok thank you so much Brendan, I will check it!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.