iap
iap is a rust library for verifying receipt information for purchases made through the Google Play Store or the Apple App Store.
Current Features
- Validating receipt data received from Unity's IAP plugin to verify subscriptions and if they are valid and not expired
- Helper functions to receive response data from Google/Apple for more granular error handling or validation
Supported Transaction Types
- Subscriptions
Coming Features
- Non-subscription purchase types
- Manual input of data for verification not received through Unity IAP
Usage
For simple validation of Unity IAP receipts
You can receive a PurchaseResponse
which will simply tell you if a purchase is valid (and not expired if a subscription) by creating a UnityPurchaseValidator
.
use *;
const APPLE_SECRET: &str = "<APPLE SECRET>";
const GOOGLE_KEY: &str = "<GOOGLE KEY JSON>";
pub async
If you wanted more granular control and access to the response from the store's endpoint, we provide helper functions to do so.
For the Play Store:
pub async
For the App Store:
pub async