         let request = NSMutableURLRequest(URL: URL, cachePolicy: .UseProtocolCachePolicy, timeoutInterval: 15)
         request.HTTPMethod = "POST"
         
-        let loginString = (self.publicKey ?? "")
-        let plainData = loginString.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
+        let plainData = self.publicKey.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
         
         guard let base64String = plainData?.base64EncodedStringWithOptions(NSDataBase64EncodingOptions(rawValue: 0)) else {
-            print("Can't encoding plainData to base64String")
+            OmiseWarning.SDKWarning("Can't encoding plainData to base64String")
             return nil
         }
         

    }
    
    // MARK: - Create a Token
    public func requestToken(requestObject: OmiseRequestObject) {
        guard let request = createURLRequest(requestObject) else {
            return
        }
        
        let session = NSURLSession.sharedSession()
        let task = session.dataTaskWithRequest(request, completionHandler: didCompleteWithDelegate)

            return (token, nil)
            
        default:
            OmiseWarning.SDKWarning("unrecognized HTTP status code: \(httpResponse.statusCode)")
            return (nil,nil)
        }
    }
