verifySubscription
abstract fun verifySubscription(@NonNull packageName: String, @NonNull subscriptionId: String, @NonNull purchaseToken: String, @NonNull listener: SubscriptionVerificationCallback.VerificationResultListener)
Called when subscription verification is needed.
Implement this method to call your backend server and verify the subscription using Google Play Developer API. Your server should return the subscription details including the expiry time.
Parameters
packageName
The package name of the app.
subscriptionId
The subscription product ID.
purchaseToken
The purchase token from Google Play.
listener
Callback to report verification results.