Skip to content

Commit

Permalink
Merge pull request #453 from ivpn/task/unverified-purschase-message
Browse files Browse the repository at this point in the history
Show detailed error message in case of .unverified payment
  • Loading branch information
jurajhilje authored Sep 17, 2024
2 parents 65dabaf + cb27623 commit d79e2f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IVPNClient/Managers/PurchaseManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ class PurchaseManager: NSObject {
log(.info, message: "[Store] Completing successful in-app purchase \(productId)")
self.complete(transaction)
break
case .success(.unverified(_, _)):
case .success(.unverified(_, let result)):
// Successful purchase but transaction/receipt can't be verified
// Could be a jailbroken phone
log(.info, message: "[Store] Purchase \(productId): success, unverified")
delegate?.purchaseError(error: ErrorResult(status: 500, message: "Purchase is unverified."))
delegate?.purchaseError(error: ErrorResult(status: 500, message: "Purchase is unverified: \(result.localizedDescription)."))
break
case .pending:
// Transaction waiting on SCA (Strong Customer Authentication) or
Expand Down

0 comments on commit d79e2f3

Please sign in to comment.