From cb276234017e4f81e45905bb78bcd51561362a7a Mon Sep 17 00:00:00 2001 From: Juraj Hilje Date: Mon, 2 Sep 2024 10:51:37 +0200 Subject: [PATCH] feat(payments): update error handling for .unverified payment --- IVPNClient/Managers/PurchaseManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IVPNClient/Managers/PurchaseManager.swift b/IVPNClient/Managers/PurchaseManager.swift index f0fe61c43..584dd9d5b 100644 --- a/IVPNClient/Managers/PurchaseManager.swift +++ b/IVPNClient/Managers/PurchaseManager.swift @@ -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