Well, I manage to test my app in the sandbox and buy a subscription plan for a month, it work like expected, it auto-renew 3 times and then “Opted-out of renewal” and “Had their subscription expire” after that, I load again the app and it show me that I have not current any active subscription what is great, but here the problem, when I try to renew the subscription, I do the same process using “purchasePackage”, sending the same package that the user previous subscribe, I don’t get any error the call work but the return “purchaserInfo” do not have any new active subscription.
the debug info after I call purchasePackage:
12022-01-11 20:55:07.209981-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: ℹ️ Vending Offerings from cache22022-01-11 20:55:07.211967-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: ℹ️ makePurchase32022-01-11 20:55:07.213718-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: 💰 Purchasing product from package - soberplus_month_1 in Offering Default42022-01-11 20:55:07.222415-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: ℹ️ PaymentQueue updatedTransaction: soberplus_month_1 1000000946127847 ((null)) 1000000946124911 - 152022-01-11 20:55:07.226589-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/E9118895-463F-4B57-A59B-0BA2251C9A60/StoreKit/sandboxReceipt62022-01-11 20:55:07.226723-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: rafaelpalma5004972022-01-11 20:55:07.228999-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST /receipts82022-01-11 20:55:07.229063-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: ℹ️ API request started: POST /v1/receipts92022-01-11 20:55:07.234099-0500 LoosidApp[26462:18278380] 7.11.0 - [Firebase/Analytics][I-ACS023141] Purchase is a duplicate and will not be reported. Product ID: soberplus_month_1102022-01-11 20:55:08.304258-0500 LoosidApp[26462:18277431] [Purchases] - DEBUG: ℹ️ API request completed with status: POST /v1/receipts 200112022-01-11 20:55:08.325978-0500 LoosidApp[26462:18277431] [Purchases] - DEBUG: ℹ️ Serial request done: POST /receipts, 0 requests left in the queue122022-01-11 20:55:08.331943-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: 💰 Finishing transaction soberplus_month_1 1000000946127847 (1000000946124911)132022-01-11 20:55:09.273919-0500 LoosidApp[26462:18273130] [Purchases] - DEBUG: ℹ️ PaymentQueue removedTransaction: soberplus_month_1 1000000946127847 (1000000946124911 (null)) (null) - 1
and this is the returned purchaserInfo:
1{2 "purchaserInfo": {3 "allPurchaseDatesMillis": {4 "soberplus_month_1": 16418632290005 },6 "firstSeenMillis": 1641849433000,7 "requestDate": "2022-01-12T01:55:08Z",8 "entitlements": {9 "all": {10 "soberplus": {11 "latestPurchaseDate": "2022-01-11T01:07:09Z",12 "latestPurchaseDateMillis": 1641863229000,13 "isSandbox": true,14 "originalPurchaseDate": "2022-01-11T00:08:14Z",15 "expirationDate": "2022-01-11T01:12:09Z",16 "expirationDateMillis": 1641863529000,17 "billingIssueDetectedAt": null,18 "unsubscribeDetectedAtMillis": 1641864817000,19 "identifier": "soberplus",20 "periodType": "NORMAL",21 "unsubscribeDetectedAt": "2022-01-11T01:33:37Z",22 "store": "APP_STORE",23 "isActive": false,24 "willRenew": false,25 "ownershipType": "PURCHASED",26 "originalPurchaseDateMillis": 1641859694000,27 "productIdentifier": "soberplus_month_1",28 "billingIssueDetectedAtMillis": null29 }30 },31 "active": {}32 },33 "latestExpirationDateMillis": 1641863529000,34 "originalPurchaseDate": "2013-08-01T07:00:00Z",35 "nonSubscriptionTransactions": [],36 "managementURL": null,37 "allPurchaseDates": {38 "soberplus_month_1": "2022-01-11T01:07:09Z"39 },40 "latestExpirationDate": "2022-01-11T01:12:09Z",41 "originalPurchaseDateMillis": 1375340400000,42 "requestDateMillis": 1641952508000,43 "allExpirationDatesMillis": {44 "soberplus_month_1": 164186352900045 },46 "activeSubscriptions": [],47 "originalApplicationVersion": "1.0",48 "allExpirationDates": {49 "soberplus_month_1": "2022-01-11T01:12:09Z"50 },51 "originalAppUserId": "rafaelpalma50049",52 "firstSeen": "2022-01-10T21:17:13Z",53 "allPurchasedProductIdentifiers": [54 "soberplus_month_1"55 ]56 },57 "productIdentifier": "soberplus_month_1"58}
Thanks