question

moonbasedesign avatar image
moonbasedesign asked

A bug in the Purchase Flow

We have a project that sells currency Packs. Each one delivers a consumable bundle ( consumable by time) to deliver virtual currency to the player. The RM prices in PlayFAB match the prices (in USD) set in the Apple store. Each purchase triggers the Apple store UI to prompt for a password and the transaction completes properly. Receipt validation works properly, transactions are logged, and the virtual currency increments properly in the client account.

However, one item set at the $0.99 price point, fails to increment the VTD for the player, and shows as $0.00 in the transaction. All other items at different prices show up properly in VTD. The data of all items is setup in a parallel fashion.

Can anyone explain what is going on here?

apispricingPlayer Inventory
10 |1200

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

Xiao Zha avatar image
Xiao Zha answered

Since RM is reserved for Real Money that is defined in US Cents, which means, 199 RM represents USD 1.99, and you mentioned that “The RM prices in PlayFab match the prices (in USD) set in the Apple store”, so the 0.99 USD should be 99 RM in your catalog. Also, for Real Money prices, we use whole numbers of the currency's fractional unit (https://en.wikipedia.org/wiki/List_of_circulating_currencies ). For USD, that would mean setting the purchase price to 99 is actually setting it to 0.99 USD (or 99 us cents). May I know how you specify the CurrencyCode and the PurchasePrice in Validate IOS Receipt API?

10 |1200

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

moonbasedesign avatar image
moonbasedesign answered

Hi Xiao:

I have my item set as RM 99 in Playfab and my API call looks like:

PlayFabClientAPI.ValidateIOSReceipt(new ValidateIOSReceiptRequest { CurrencyCode = args.purchasedProduct.metadata.isoCurrencyCode, PurchasePrice = (int)args.purchasedProduct.metadata.localizedPrice * 100, ReceiptData = payload }, result => {

As a test I switched the price in the App store to $1.99 (USD) and the transaction value showed up properly on the playfab game manager. Switching the price back to $0.99 in the app store triggers a $0.00 transaction in PlayFab, so it seems to be an issue with the $0.99 price point.

Thanks.

1 comment
10 |1200

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

Xiao Zha avatar image Xiao Zha commented ·

Could you please provide your TitleId and the PlayerId for us to research?

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.