     }
     
     public func buyProduct(_ product: SKProduct) {
-        print("Buying \(product.productIdentifier)...")
+        log.info("Buying \(product.productIdentifier)...")
         let payment = SKPayment(product: product)
         SKPaymentQueue.default().add(payment)
     }

    }
    
    fileprivate func completeTransaction(_ transaction: SKPaymentTransaction) {
        print("completeTransanction...")
        
        deliverPurchasedNotificationForIdentifier(transaction.payment.productIdentifier)
        SKPaymentQueue.default().finishTransaction(transaction)

            return
        }
        
        log.warning("restoreTransaction... \(productIdentifier)")
        deliverPurchasedNotificationForIdentifier(productIdentifier)
        SKPaymentQueue.default().finishTransaction(transaction)
        Answers.logContentView(withName: "Purchase restored", contentType: "IAP", contentId: Date().dateString, customAttributes: nil)
    }
    
    fileprivate func failedTransaction(_ transaction: SKPaymentTransaction) {
        log.warning("failedTransaction...")
        if let transactionError = transaction.error as? SKError{
            
            if transactionError.code != SKError.paymentCancelled {
                log.warning("Transaction Error: \(transaction.error?.localizedDescription)")
                if let desc = transaction.error?.localizedDescription {
                    Answers.logContentView(withName: "Purchase failed",
                                                   contentType: "IAP",
                                                   contentId: Date().dateString,
                                                   customAttributes: ["Error": desc])
                }
            }
        }
        
