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

Forward all errors for Apple callback for restoreCompletedTransactions() #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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: 1 addition & 3 deletions Chargebee/Classes/Purchase/CBPurchaseManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ extension CBPurchase: SKPaymentTransactionObserver {
}

public func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error) {
if let error = error as? RestoreError {
receiveRestoredTransactionsFinished(error)
}
receiveRestoredTransactionsFinished(error)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension CBPurchase {
self.restoredPurchasesCount += 1
}

func receiveRestoredTransactionsFinished(_ error: RestoreError?) {
func receiveRestoredTransactionsFinished(_ error: Error?) {
if let error = error {
debugPrint("Failed to restore purchases: \(error.localizedDescription)")
self.restoreResponseHandler?(.failure(.restoreFailed))
Expand Down