Skip to content

Commit

Permalink
feat(payments): update error handling for .unverified payment
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajhilje committed Sep 2, 2024
1 parent e06ae71 commit cb27623
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 cb27623

Please sign in to comment.