SwiftyStoreKit icon indicating copy to clipboard operation
SwiftyStoreKit copied to clipboard

Unknown error. Please contact support

Open hzlzh opened this issue 3 years ago • 1 comments

Bug Report

"Unknown error. Please contact support" Anyone solve this?

func purchasePro1() {
        SwiftyStoreKit.purchaseProduct(pro1ID, quantity: 1, atomically: true) { result in
            switch result {
            case .success(let purchase):
                print("Purchase Success: \(purchase.productId)")
                isPro1Purchased = true
                self.delegate?.purchaseSucceed()
            case .error(let error):
                var errorString = ""
                switch error.code {
                case .unknown: errorString = "Unknown error. Please contact support"
                case .clientInvalid: errorString = "Not allowed to make the payment"
                case .paymentCancelled: break
                case .paymentInvalid: errorString = "The purchase identifier was invalid"
                case .paymentNotAllowed: errorString = "The device is not allowed to make the payment"
                case .storeProductNotAvailable: errorString = "The product is not available in the current storefront"
                case .cloudServicePermissionDenied: errorString = "Access to cloud service information is not allowed"
                case .cloudServiceNetworkConnectionFailed: errorString = "Could not connect to the network"
                case .cloudServiceRevoked: errorString = "User has revoked permission to use this cloud service"
                default: errorString = (error as NSError).localizedDescription
                }
                self.delegate?.purchaseFailed(error: errorString)
            case .deferred(purchase: _):
                self.delegate?.purchaseFailed(error: "deferred")
            }
        }
    }
  • https://github.com/bizz84/SwiftyStoreKit/issues/305#issuecomment-370218032
  • https://github.com/bizz84/SwiftyStoreKit/issues/305#issuecomment-431040349
  • https://github.com/bizz84/SwiftyStoreKit/issues/376#issuecomment-407530555
  • https://github.com/bizz84/SwiftyStoreKit/issues/653#issuecomment-983745388

To Reproduce User feedback

Expected behavior Unknown error. Please contact support

Platform Information

  • OS: macOS 10.14.3
  • Purchase Type: consumable
  • Environment: production
  • SwiftyStoreKit version: 0.16.4

Screenshots image

hzlzh avatar May 26 '22 07:05 hzlzh

Did you solve it

zhouwude avatar Jan 09 '23 05:01 zhouwude