bizz84 / SwiftyStoreKit

Lightweight In App Purchases Swift framework for iOS 8.0+, tvOS 9.0+ and macOS 10.10+ ⛺

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Purchase function returns success without purchasing product

tejaskdubal opened this issue · comments

Bug Report

Calling SwiftyStoreKit.purchaseProduct does not show purchase dialog
It return callback with success with old transaction details

To Reproduce
Steps to reproduce the behaviour:

  1. Existing subscription status is EXPIRED
  2. User try to buy a new subscription
  3. Call SwiftyStoreKit.purchaseProduct
  4. callback return success with old transaction details without showing purchase dialog

Expected behaviour
After calling SwiftyStoreKit.purchaseProduct app should display purchase dialog

Platform Information

  • iOS 15.1
  • Purchase Type: auto-renewable subscription
  • Environment: TestFlight
  • SwiftyStoreKit version: 0.16.1

Additional context

Very in-consistent issue reproduced for some of the users

@tejaskdubal I have the same issue, did find any solutions?

Same issue with you. SwiftyStoreKit will implement paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) and handle transactions. In my case, it found a transaction with .restored state, but send it to paymentsController. It may be should send to restorePurchasesController?

image

My solution is use original SKPayment API to fix this problem.

same issue for me. Did this happen for you also in production?
I'm experiencing this in testflight at the moment with only one device