|
1 gadu atpakaļ | |
---|---|---|
.. | ||
.sample.json | 1 gadu atpakaļ | |
LocalReceiptValidation.cs | 1 gadu atpakaļ | |
LocalReceiptValidation.cs.meta | 1 gadu atpakaļ | |
LocalReceiptValidation.unity | 1 gadu atpakaļ | |
LocalReceiptValidation.unity.meta | 1 gadu atpakaļ | |
MissingTangleClassesWarning.cs | 1 gadu atpakaļ | |
MissingTangleClassesWarning.cs.meta | 1 gadu atpakaļ | |
README.md | 1 gadu atpakaļ | |
README.md.meta | 1 gadu atpakaļ | |
UserWarning.cs | 1 gadu atpakaļ | |
UserWarning.cs.meta | 1 gadu atpakaļ |
This sample showcases how to use the cross-platform validator to do local receipt validation. The cross-platform validator supports the Google Play Store and Apple App Store.
Important: While Unity IAP provides a local validation method, local validation is more vulnerable to fraud. Validating sensitive transactions server-side where possible is considered best practice. For more information, please see Apple and Google Play’s documentation on fraud prevention.
If the content that the user is purchasing already exists on the device, the application simply needs to make a decision about whether to unlock it.
Unity IAP provides tools to help you hide content and to validate and parse receipts through Google Play and Apple stores.
For more information, see the documentation on the topic.
InAppPurchasing game object > Local Receipt Validation script > Gold Product Id field
or change the GoldProductId
value in the LocalReceiptValidation.cs
script.GooglePlayTangle
, AppleTangle
, and AppleStoreKitTestTangle
classes. To generate these classes in your project, do the
following:
Services > In-App Purchasing > Receipt Validation Obfuscator
.GooglePlayTangle
, AppleTangle
, and AppleStoreKitTestTangle
classes in your project.)Build Settings
windowAndroid
*, iOS
, macOS
, or tvOS
.
GooglePlayStore
is selected. You can change the currently selected store under Services > In-App Purchasing > Configure
and changing the Current Targeted Store
field.