Announcement

Collapse
No announcement yet.

How to get the receipt info of In-App purchase in UDK

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to get the receipt info of In-App purchase in UDK

    It's very simple to get the receipt info (encoded in base64 form) in UDK. However, its not obvious thing if you're trying to find it out from the unreal script code, and there is no word about it on UDN.

    This value is hidden in PlatformInterfaceData struct as StringValue2 variable. So, you can simply get it in PurchaseComplete delegate:

    Code:
    function OnProductPurchaseComplete(const out PlatformInterfaceDelegateResult Result)
    {
    	`log("Purchase complete:");
    	`log("  Product = " $ Result.Data.StringValue);
    	`log("  bSuccess = " $ Result.bSuccessful);
    	`log("  Result = " $ Result.Data.IntValue);
    	`log("  Receipt = " $ Result.Data.StringValue2);
    }
    So, that's the value you should use to check the purchase validation via AppStore servers

    Cheers!
Working...
X