Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show detailed error message in case of .unverified payment #453

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading