             }
             return
         }
-        purchase(product: product, completion: completion)
+        completion(result: .Success(product: product))
+    }
+    
+    public func purchaseProduct(productId: String, completion: (result: PurchaseResultType) -> ()) {
+        
+        if let product = store.products[productId] {
+            purchase(product: product, completion: completion)
+        } else {
+            retrieveProductInfo(productId) { (result) -> () in
+                if case .Success(let product) = result {
+                    self.purchase(product: product, completion: completion)
+                }   else if case .Error(let error) = result {
+                    completion(result: .Error(error: error))
+                }
+            }
+        }
     }
     
     public func restorePurchases(completion: (result: RestoreResultType) -> ()) {

        case Success(productId: String)
        case Error(error: ErrorType)
    }
    public enum RestoreResultType {
        case Success(productId: String)
        case Error(error: ErrorType)

    }
    
    // MARK: Public methods
    public func retrieveProductInfo(productId: String, completion: (result: RetrieveResultType) -> ()) {
        guard let product = store.products[productId] else {
            
            requestProduct(productId) { (inner: () throws -> SKProduct) -> () in
                do {
                    let product = try inner()
                    completion(result: .Success(product: product))
                }
                catch let error {
                    completion(result: .Error(error: error))
