- Home /
[Android] IAP Subscription 'developerPayload' is missing
Unity 2020.1.2f1
IAP 2.2.1
Buying a subscription works, when I reinstall the application, restore also works, But when I just log out and log in to the app I get a product subscription with receipt which not contain enough information, the 'developerPayload' field is missing. How I can check subscription status?
'This product is not available for SubscriptionManager class, only products that are purchase by 1.19+ SDK can use this class.' - What SDK is meant?
#if SUBSCRIPTION_MANAGER
if (item.receipt != null)
{
if (item.definition.type == ProductType.Subscription)
{
if (checkIfProductIsAvailableForSubscriptionManager(item.receipt))
{
string intro_json = (introductory_info_dict == null || !introductory_info_dict.ContainsKey(item.definition.storeSpecificId)) ? null : introductory_info_dict[item.definition.storeSpecificId];
SubscriptionManager p = new SubscriptionManager(item, intro_json);
SubscriptionInfo info = p.getSubscriptionInfo();
Debug.Log(string.Join("\n",
new[]
{
$"Information about subscription product: {item.definition.id}",
$"Purchase date: {info.getPurchaseDate()}",
$"Expire date: {info.getExpireDate()}",
$"Is subscribed? {info.isSubscribed().ToString()}",
$"Is expired? {info.isExpired().ToString()}",
$"Is cancelled? {info.isCancelled()}",
$"Is in free trial period? {info.isFreeTrial()}",
$"Is auto renewing: {info.isAutoRenewing()}",
$"Subscription remaining valid time until next billing date is: {info.getRemainingTime()}",
$"Is this product in introductory price period? {info.isIntroductoryPricePeriod()}",
$"The product introductory localized price is: {info.getIntroductoryPrice()}",
$"The product introductory price period is: : {info.getIntroductoryPricePeriod()}",
$"The number of product introductory price period cycles is:: {info.getIntroductoryPricePeriodCycles()}",
}));
Answer by cs120319992 · Jan 09, 2021 at 05:09 PM
Remve verification fixed this
if (checkIfProductIsAvailableForSubscriptionManager(item.receipt))
{
...
}
How is this an accepted answer? What does "Remve verification" indicates what the solution is here?
Your answer
Follow this Question
Related Questions
Simple In App Purchase on iOS 9 Answers
In App Billing by Alipay, how to check if google services is not available 0 Answers
Authentication error when testing Unity IAP on an Android device 1 Answer
Can I remove READ_PHONE_STATE permission on android while using Unity IAP? 3 Answers
In App Purchase, after restart game 1 Answer