 		}
 	}
 	
+	public func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) {
+		restoreProcessHandler?(success: true, restored: restoredTransaction, error: nil)
+		restoreProcessHandler = nil
+	}
+	
+	public func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: NSError) {
+		restoreProcessHandler?(success: false, restored: nil, error: error)
+		restoreProcessHandler = nil
+	}
+	
 	private func complete(_ transaction: SKPaymentTransaction) {
 		finishTrasactionFor(transaction.payment.productIdentifier)
 		SKPaymentQueue.default().finishTransaction(transaction)

			return
		}
		
		finishTrasactionFor(productIdentifier)
		SKPaymentQueue.default().finishTransaction(transaction)
	}

		buyCompletionHandler[product.productIdentifier] = completion
	}
	
	///Initialize restore process for previous purchases.
	///- parameter requestCompletion: This block is called upon error on restoring purchases or if there are no purchase to restore, if some purchases are restored the appropriate callback block will be called (if present).
	///- parameter success: Set to `true` if the restoration process was successful, `false` otherwise.
	///- parameter restored: If the restoration was successful will hold the number of restored transaction, `nil` otherwise.
	///- parameter error: The error in case of failure of the restoration process, `nil` otherwise.
	///- parameter productCompletion: The callback block to be called after each purchases, identified by its productId as the key, is completed.
	public func restorePurchases(requestCompletion: ((success: Bool, restored: Int?, error: NSError?) -> ())?, productCompletion: [String: ProductTransactionHandler]?) {
		restoreProcessHandler = requestCompletion
		buyCompletionHandler += productCompletion ?? [:]
		restoredTransaction = 0
		SKPaymentQueue.default().restoreCompletedTransactions()
	}
	
