                         let resultCode = Int(result) else {
                             return false
                     }
-
                     let success = (resultCode == 0)
-
                     if success {
                         sharedMonkeyKing.deliverCompletionHandler?(.success)
                     } else {
-                        sharedMonkeyKing.deliverCompletionHandler?(.failure(.sdk(reason: .unknown)))
+                        sharedMonkeyKing.deliverCompletionHandler?(.failure(.sdk(reason: .unknown))) // TODO: pass resultCode
                     }
-
                     return success
                 }
             }
-
             // OAuth Failed
             if urlString.contains("platformId=wechat") && !urlString.contains("state=Weixinauth") {
                 let error = NSError(domain: "WeChat OAuth Error", code: -1, userInfo: nil)
                 sharedMonkeyKing.oauthCompletionHandler?(nil, nil, error)
                 return false
             }
-
             return false
         }
-
         // QQ Share
         if urlScheme.hasPrefix("QQ") {
-
-            guard let errorDescription = url.monkeyking_queryDictionary["error"] as? String else {
-                return false
-            }
-
+            guard let errorDescription = url.monkeyking_queryDictionary["error"] as? String else { return false }
             let success = (errorDescription == "0")
-
             if success {
                 sharedMonkeyKing.deliverCompletionHandler?(.success)
             } else {
-                sharedMonkeyKing.deliverCompletionHandler?(.failure(.sdk(reason: .unknown)))
-            }
-
+                sharedMonkeyKing.deliverCompletionHandler?(.failure(.sdk(reason: .unknown))) // TODO: pass errorDescription
+            }
             return success
         }
-
         // QQ OAuth
         if urlScheme.hasPrefix("tencent") {
-
-            guard let account = sharedMonkeyKing.accountSet[.qq] else {
-                return false
-            }
-
+            guard let account = sharedMonkeyKing.accountSet[.qq] else { return false }
             var userInfo: [String: Any]?
             var error: Swift.Error?
-
             defer {
                 sharedMonkeyKing.oauthCompletionHandler?(userInfo, nil, error)
             }
-
             guard
                 let data = UIPasteboard.general.data(forPasteboardType: "com.tencent.tencent\(account.appID)"),
                 let info = NSKeyedUnarchiver.unarchiveObject(with: data) as? [String: Any] else {
                     error = NSError(domain: "OAuth Error", code: -1, userInfo: nil)
                     return false
             }
-
             guard let result = info["ret"] as? Int, result == 0 else {
                 if let errorDomatin = info["user_cancelled"] as? String, errorDomatin == "YES" {
                     error = NSError(domain: "User Cancelled", code: -2, userInfo: nil)

            case .file:
                fatalError("web Weibo not supports File type")
            }

        case .alipay(let type):

            let dictionary = createAlipayMessageDictionary(withScene: type.scene, info: type.info, appID: appID)
            guard let data = try? PropertyListSerialization.data(fromPropertyList: dictionary, format: .xml, options: 0) else {
                completionHandler(.failure(.sdk(reason: .serializeFailed)))
                return
            }

            UIPasteboard.general.setData(data, forPasteboardType: "com.alipay.openapi.pb.req.\(appID)")

            if !openURL(urlString: "alipayshare://platformapi/shareService?action=sendReq&shareId=\(appID)") {
                completionHandler(.failure(.sdk(reason: .invalidURLScheme)))
            }
        }
    }
}


// MARK: Pay


                }
                return false
            }
            userInfo = info
            return true
        }
        // Weibo
        if urlScheme.hasPrefix("wb") {
            let items = UIPasteboard.general.items
            var results = [String: Any]()
            for item in items {
                for (key, value) in item {
                    if let valueData = value as? Data, key == "transferObject" {
