Showing results for 
Search instead for 
Did you mean: 

Where can I obtain In app purchase receipt and price amount & currency for analytics?

Honored Guest

Hi! I'm adding in app purchases in a Oculus app using Unity Oculus plugin. In order to measure monetization, I want to log purchases in some third party analytics services. Most of them request the price amount and the price currency in ISO 4217 format ("USD", "EUR", "GBP", etc.).

I don't know how can I obtain this values using the Unity API. I found this methods:

  • CAPI.ovr_Price_GetAmountInHundredths(IntPtr o)
  • CAPI.ovr_Price_GetCurrency(IntPtr o)

The problem is that I don't know what I need to pass as "IntPtr o" parameter. I tried to use the native message used  to construct Product and Purchase classes, but it didn't work. It looks like there are not implemented as Price class doesn't exist.

In other way, maybe I could take some json receipt than it can be deserialize with this information, but I don't know where in Purchase class I can get it (any the json format if it exists).

I don't know what Purchase.DeveloperPayload and Purchase.ReportingId fields are, as they are always empty (at least using test purchases) and there is no documentation about it.

I appreciate in advance any help :).