Browse Source

【综合】内嵌支付接口调试

tangchao 6 months ago
parent
commit
37b0b0c433

+ 627 - 30
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.swift

@@ -32,14 +32,36 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
     }
     
     @objc func btnAction() {
-//        self.subscriptions()
-        self.retrieval()
+        self.subscriptions()
+//        self.retrieval()
+//        self.getPriceUrl()
     }
     
+    // 获取价格
     func getPriceUrl() {
-        
+        let urlString = kVerificationServer + "/api/product/get-price/v2"
+        KMAdvertisementRequestServer.requestServer.request(urlString: urlString, method: "GET", params: nil) { [self] task, responseObject, error in
+            if (error == nil && responseObject != nil) {
+                let array = responseObject?["data"] as? NSDictionary
+                if array != nil {
+                    /*
+                     activity_cny_price 优惠价(人民币)
+                     activity_price 优惠价(美元)
+                     price 原价(美元)
+                     cny_price 原价(人民币)
+                     */
+                    //解析数据
+                    let productsDict = array?.object(forKey: "data") as? NSDictionary
+                } else {
+                    print("解析数据失败array")
+                }
+            } else {
+                print("解析数据失败数据不存在")
+            }
+        }
     }
     
+    // 获取优惠卷
     func retrieval() {
         let urlString = kVerificationServer + "/api/coupons/retrieval"
         
@@ -51,25 +73,22 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
             "app_code" : app_code,
             "product_code" : productCode]
         KMAdvertisementRequestServer.requestServer.request(urlString: urlString, method: "GET", params: params) { [self] task, responseObject, error in
-            
             if (error == nil && responseObject != nil) {
                 let array = responseObject?["data"] as? NSDictionary
                 if array != nil {
                     //解析数据
-                    print("开始解析数据")
-                    for model in array as! [NSDictionary] {
-                        let jsonString: String = (model["detail"] as? String) ?? ""
-                        let jsonData: Data = jsonString.data(using: .utf8)!
-                        let dict = try?JSONSerialization.jsonObject(with: jsonData)
-//                        infoDict = dict as! NSDictionary
+                    let status = array?.object(forKey: "status") as? String ?? ""
+                    if status == "unused" {
+                        // 折扣(eg. 0.7)
+                        let discount  = array?.object(forKey: "discount")
+                        // 价格 (应该是美元)
+                        let price = array?.object(forKey: "price")
                     }
                 } else {
                     print("解析数据失败array")
-//                    completion(nil, responseObject, error)
                 }
             } else {
                 print("解析数据失败数据不存在")
-//                completion(nil, responseObject, error)
             }
         }
     }
@@ -78,8 +97,20 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         let urlString = kVerificationServer + "/api/orders/getOrderStatus"
 
         // 升级产品
-        let paraDict = ["token" : trade_no]
-        var postData  = try! JSONSerialization.data(withJSONObject: paraDict)
+        let paraDict = ["trade_no" : trade_no]
+        var jsonD: String = ""
+        if let jsonData = try? JSONSerialization.data(withJSONObject: paraDict, options:[]),
+           let jsonString = String(data: jsonData, encoding: .utf8) {
+            jsonD = jsonString
+        }
+        
+        let tool = KMVerificationRSA()
+        let publicKey = tool.loadPublicKey()
+        let encryptedData = tool.encrypt(plainText: jsonD, publicKey: publicKey!)
+        print("Encrypted data: \(encryptedData?.base64EncodedString() ?? "nil")")
+        let encryptedString = encryptedData?.base64EncodedString();
+        
+        var postData  = try! JSONSerialization.data(withJSONObject: ["token" : encryptedString])
         var request = URLRequest(url: URL(string: urlString)!,timeoutInterval: Double.infinity)
         request.addValue("Apifox/1.0.0 (https://www.apifox.cn)", forHTTPHeaderField: "User-Agent")
         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
@@ -94,20 +125,13 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
            }
             let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary ?? [:]
             if jsonObject != nil {
-                let data1: NSDictionary = jsonObject!["data"] as? NSDictionary ?? [:]
-                let subscriptionInfo = data1.object(forKey: "subscription") as? NSDictionary
-                let paypal_order_info = subscriptionInfo?.object(forKey: "paypal_order") as? NSDictionary
-                if let dataInfo = paypal_order_info, dataInfo.count > 0 {
-                    // paypal_order
-                    // page_pay_url 链接
-                    // https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-3V503434MD108282U
-                    // trade_no 订单id 用于校验订单 【22024083006591098】
-                    let trade_no = dataInfo.object(forKey: "trade_no")
-                    let page_pay_url = dataInfo.object(forKey: "page_pay_url")
-                    KMPrint("trade_no:" + "\(trade_no)" + ";" + "page_pay_url:" + "\(page_pay_url)")
-                } else {
-                    // 数据错误
-                }
+                let data1 = jsonObject!["data"] as? String
+                
+                let tool = KMVerificationRSA()
+                // XJYSy+T0k9VZbH1SJlaWj3FBKmrrDQCBk6PnAT0N4syzWNjdk3u89x3oXpZ8BZ37z9Dbv799QepQgQgGspBB/AXjtfYEICYpzs1RD2juTIglOqzakrJZOl+0s9M4R+pdbsigL+P39NnqWNXHkVZGDLrbL9ZNLuH2IztxHd/EUGmkwJUyx0ZIPCuBMD80EErlZt/iMGDa5zIww6dCrzpmT1o1qAXPkEri6WkDf/IG0JqytDsmXmEtCtOegc44Q9rpbsyBdp4YYqoeQ6/88/2TtFySd06dBIZkMZzNW8eN1MxmeWEDdo4Ji5uQz32aH/qPAi7XUXAg9Y3luBLyodt24A==
+                let ss = tool.decrypt(source: data1! as NSString)
+                
+                KMPrint("")
             } else {
                 // 数据错误
             }
@@ -129,7 +153,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
                              // 优惠卷id
                              "coupon_code": "",
                              // 支付类型 paypal alipay wxpay paddle
-                             "payment": "paypal",
+                             "payment": "alipay",
                              // 地区
                              "customer_country": "US",
                              // 邮编码
@@ -157,7 +181,8 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
             if jsonObject != nil {
                 let data1: NSDictionary = jsonObject!["data"] as? NSDictionary ?? [:]
                 let subscriptionInfo = data1.object(forKey: "subscription") as? NSDictionary
-                let paypal_order_info = subscriptionInfo?.object(forKey: "paypal_order") as? NSDictionary
+//                let paypal_order_info = subscriptionInfo?.object(forKey: "paypal_order") as? NSDictionary
+                let paypal_order_info = subscriptionInfo?.object(forKey: "alipay_order") as? NSDictionary
                 if let dataInfo = paypal_order_info, dataInfo.count > 0 {
                     // paypal_order
                     // page_pay_url 链接
@@ -204,6 +229,578 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
     
 }
 
+// /api/product/get-price/v2
+
+/*
+ ▿ some : 1 element
+   ▿ 0 : 2 elements
+     - key : data
+     ▿ value : 3 elements
+       ▿ 0 : 2 elements
+         - key : message
+         - value : success
+       ▿ 1 : 2 elements
+         - key : data
+         ▿ value : 37 elements
+           ▿ 0 : 2 elements
+             - key : com.cisdem.pdfmaster.cross.platform.product_3
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 776
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 119.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 119.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 776
+           ▿ 1 : 2 elements
+             - key : com.filmage.pro-lite.mac.forever
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 388
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 59.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 59.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 388
+           ▿ 2 : 2 elements
+             - key : com.brother.pdfreaderpro.windows.product_3+com.brother.pdfreaderpro.mac.product_3
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 1036
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 159.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 159.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 1036
+           ▿ 3 : 2 elements
+             - key : com.brother.pdfreaderpro.cross.platform.product_3
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 486
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 74.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 119.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 776
+           ▿ 4 : 2 elements
+             - key : com.cisdem.pdfmaster.ai.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 99
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 14.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 14.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 99
+           ▿ 5 : 2 elements
+             - key : com.filmage.screen.mac
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 92
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 14.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 29.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 189
+           ▿ 6 : 2 elements
+             - key : com.brother.pdfreaderpro.windows.product_3
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 259
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 39.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 79.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 518
+           ▿ 7 : 2 elements
+             - key : com.brother.pdfreaderpro.combination.product
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 600
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 100
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 100
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 600
+           ▿ 8 : 2 elements
+             - key : com.brother.pdfreaderpro.mac.product_2.checkout
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 78
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 12
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 20.00
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 130.00
+           ▿ 9 : 2 elements
+             - key : com.brother.pdfreaderpro.windows.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 388
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 59.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 59.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 388
+           ▿ 10 : 2 elements
+             - key : com.brother.pdfreaderpro.ai.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 99
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 14.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 14.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 99
+           ▿ 11 : 2 elements
+             - key : com.brother.pdftecheditor.windows
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 598
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 89.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 89.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 598
+           ▿ 12 : 2 elements
+             - key : com.imyfone.pdf.cross.platform.trail
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 776
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 1
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 1
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 776
+           ▿ 13 : 2 elements
+             - key : com.brother.pdfreaderpro.mac.product_3
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 259
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 39.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 79.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 518
+           ▿ 14 : 2 elements
+             - key : com.brother.pdfreaderpro.mac.product_2
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 128
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 19.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 19.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 128
+           ▿ 15 : 2 elements
+             - key : com.brother.pdfreaderpro.windows.product_3+com.brother.pdfreaderpro.ai.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 318
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 48.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 94.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 617
+           ▿ 16 : 2 elements
+             - key : com.filmage.pro-lite.mac
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 259
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 39.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 39.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 259
+           ▿ 17 : 2 elements
+             - key : com.brother.pdfreaderpro.mac.product_3+com.filmage.screen.mac
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 318
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 49.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 109.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 707
+           ▿ 18 : 2 elements
+             - key : com.brother.pdfreaderpro.mac.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 388
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 59.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 59.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 388
+           ▿ 19 : 2 elements
+             - key : com.filmage.screen.mac.6_months
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 99
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 14.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 14.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 99
+           ▿ 20 : 2 elements
+             - key : com.brother.pdfreaderpro.cross.platform.product_3+com.brother.pdfreaderpro.ai.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 604
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 92.96
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 149.96
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 974
+           ▿ 21 : 2 elements
+             - key : com.brother.pdfreaderpro.windows.product_1+com.brother.pdfreaderpro.ai.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 487
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 74.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 74.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 487
+           ▿ 22 : 2 elements
+             - key : com.imyfone.pdf.cross.platform.product_3
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 776
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 119.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 119.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 776
+           ▿ 23 : 2 elements
+             - key : com.kdanmobile.mac.PDFReaderLite.perpetual_license_pack.002
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 798
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 119.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 119.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 798
+           ▿ 24 : 2 elements
+             - key : com.brother.pdfreaderpro.windows.product_2
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 128
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 19.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 19.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 128
+           ▿ 25 : 2 elements
+             - key : com.brother.pdfreaderpro.mac.product_1+com.brother.pdfreaderpro.ai.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 487
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 74.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 74.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 487
+           ▿ 26 : 2 elements
+             - key : com.brother.pdfreaderpro.windows.product_2.checkout
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 78
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 12
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 20.00
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 130.00
+           ▿ 27 : 2 elements
+             - key : com.filmage.converter.mac
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 68
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 9.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 9.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 68
+           ▿ 28 : 2 elements
+             - key : com.brother.pdfreaderpro.mac.product_3+com.brother.pdfreaderpro.ai.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 318
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 48.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 94.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 617
+           ▿ 29 : 2 elements
+             - key : com.cisdem.pdfmaster.windows.product_3
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 518
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 79.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 79.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 518
+           ▿ 30 : 2 elements
+             - key : com.filmage.converter.mac+com.filmage.pro-lite.mac
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 0.02
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 49.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 49.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 0.02
+           ▿ 31 : 2 elements
+             - key : com.brother.pdfreaderpro.cross.platform.product_1
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 600
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 100
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 100
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 600
+           ▿ 32 : 2 elements
+             - key : com.brother.pdftecheditor
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 598
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 89.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 89.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 598
+           ▿ 33 : 2 elements
+             - key : com.kdanmobile.mac.PDFReaderLite.standard_license_pack.002
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 588
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 89.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 89.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 588
+           ▿ 34 : 2 elements
+             - key : com.filmage.screen.mac+com.filmage.pro-lite.mac
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 0.02
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 69.98
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 69.98
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 0.02
+           ▿ 35 : 2 elements
+             - key : com.cisdem.pdfmaster.mac.product_3
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 518
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 79.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 79.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 518
+           ▿ 36 : 2 elements
+             - key : com.brother.pdfreaderpro.cross.platform.product_2
+             ▿ value : 4 elements
+               ▿ 0 : 2 elements
+                 - key : activity_cny_price
+                 - value : 258
+               ▿ 1 : 2 elements
+                 - key : activity_price
+                 - value : 39.99
+               ▿ 2 : 2 elements
+                 - key : price
+                 - value : 79.99
+               ▿ 3 : 2 elements
+                 - key : cny_price
+                 - value : 518
+       ▿ 2 : 2 elements
+         - key : code
+         - value : 200
+ */
 
 // /api/coupons/retrieval
 /*

File diff suppressed because it is too large
+ 328 - 0
PDF Office/PDF Master/Class/Purchase/DMG/Tools/KMVerificationRSA.swift


+ 16 - 0
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -31,6 +31,9 @@
 		65D6840C2C6A3669003A532E /* KMEraserAnnotationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65D6840B2C6A3669003A532E /* KMEraserAnnotationController.swift */; };
 		65D6840D2C6A3669003A532E /* KMEraserAnnotationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65D6840B2C6A3669003A532E /* KMEraserAnnotationController.swift */; };
 		65D6840E2C6A3669003A532E /* KMEraserAnnotationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65D6840B2C6A3669003A532E /* KMEraserAnnotationController.swift */; };
+		65EF3A7D2C81C1F500CCFC8F /* KMVerificationRSA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EF3A7C2C81C1F500CCFC8F /* KMVerificationRSA.swift */; };
+		65EF3A7E2C81C1F500CCFC8F /* KMVerificationRSA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EF3A7C2C81C1F500CCFC8F /* KMVerificationRSA.swift */; };
+		65EF3A7F2C81C1F500CCFC8F /* KMVerificationRSA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EF3A7C2C81C1F500CCFC8F /* KMVerificationRSA.swift */; };
 		89316822296D73CC0073EA59 /* KMSignatureAnnotationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89316820296D73CC0073EA59 /* KMSignatureAnnotationViewController.m */; };
 		89316823296D73CC0073EA59 /* KMSignatureAnnotationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89316820296D73CC0073EA59 /* KMSignatureAnnotationViewController.m */; };
 		89316824296D73CC0073EA59 /* KMSignatureAnnotationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89316820296D73CC0073EA59 /* KMSignatureAnnotationViewController.m */; };
@@ -5525,6 +5528,7 @@
 		65341C7B2C646C6400FE30F9 /* KMSearchReplaceHanddler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMSearchReplaceHanddler.swift; sourceTree = "<group>"; };
 		65D684052C6A250C003A532E /* KMWavyLineAnnotationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMWavyLineAnnotationController.swift; sourceTree = "<group>"; };
 		65D6840B2C6A3669003A532E /* KMEraserAnnotationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMEraserAnnotationController.swift; sourceTree = "<group>"; };
+		65EF3A7C2C81C1F500CCFC8F /* KMVerificationRSA.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMVerificationRSA.swift; sourceTree = "<group>"; };
 		8931681F296D73CC0073EA59 /* KMSignatureAnnotationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KMSignatureAnnotationViewController.h; sourceTree = "<group>"; };
 		89316820296D73CC0073EA59 /* KMSignatureAnnotationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMSignatureAnnotationViewController.m; sourceTree = "<group>"; };
 		89316821296D73CC0073EA59 /* KMSignatureAnnotationViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMSignatureAnnotationViewController.xib; sourceTree = "<group>"; };
@@ -7906,6 +7910,14 @@
 			path = Controller;
 			sourceTree = "<group>";
 		};
+		65EF3A7B2C81C1F500CCFC8F /* Tools */ = {
+			isa = PBXGroup;
+			children = (
+				65EF3A7C2C81C1F500CCFC8F /* KMVerificationRSA.swift */,
+			);
+			path = Tools;
+			sourceTree = "<group>";
+		};
 		8931681E296D73C10073EA59 /* Signature */ = {
 			isa = PBXGroup;
 			children = (
@@ -13352,6 +13364,7 @@
 		BBA922102B4E77CA0061057A /* DMG */ = {
 			isa = PBXGroup;
 			children = (
+				65EF3A7B2C81C1F500CCFC8F /* Tools */,
 				BBA922122B4E783F0061057A /* KMPurchaseCompareDMGWindowController.h */,
 				BBA922142B4E783F0061057A /* KMPurchaseCompareDMGWindowController.m */,
 				BBA922132B4E783F0061057A /* KMPurchaseCompareDMGWindowController.xib */,
@@ -17301,6 +17314,7 @@
 				BBC28F462B0F352000D73206 /* KMImageToolTipContext.swift in Sources */,
 				BB90E4EE2AF3546500B04B9F /* NSUserDefaultsController+KMExtension.swift in Sources */,
 				BB88106D2B4F771D00AFA63E /* KMVerificationInfoViewController.m in Sources */,
+				65EF3A7D2C81C1F500CCFC8F /* KMVerificationRSA.swift in Sources */,
 				BB6985592C2A94BD007D307D /* KMGuideTargetView.swift in Sources */,
 				BBB14A532978DD5400936EDB /* KMRedactTools.swift in Sources */,
 				BB5F8A1129BB04F000365ADB /* GBDeviceInfo_Common.m in Sources */,
@@ -18717,6 +18731,7 @@
 				9F02016B2A1B088700C9B673 /* KMAIOpenPDFFilesVC.swift in Sources */,
 				9F0CB4DA2986553600007028 /* KMDesignToken+VerticalPadding.swift in Sources */,
 				9FF94F1A29A770B500B1EF69 /* KMFillSignShapePanel.swift in Sources */,
+				65EF3A7E2C81C1F500CCFC8F /* KMVerificationRSA.swift in Sources */,
 				9F8539C729430AC400DF644E /* KMToolbarRightView.swift in Sources */,
 				AD0E8ABA2A31BDDD00DBFD3C /* KMProduct.swift in Sources */,
 				AD58F4172B1DAC0900299EE0 /* KMPrintSettingView.swift in Sources */,
@@ -19791,6 +19806,7 @@
 				AD1CA4132A061CCD0070541F /* KMAnnotationScreenColorViewItem.swift in Sources */,
 				BB3198202AC57ACA00107371 /* CPDFPage+PDFListView.swift in Sources */,
 				9FCFEC822AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */,
+				65EF3A7F2C81C1F500CCFC8F /* KMVerificationRSA.swift in Sources */,
 				ADDF83822B391A5D00A81A4E /* DSignatureSaveFolderViewController.swift in Sources */,
 				BB69855B2C2A94BD007D307D /* KMGuideTargetView.swift in Sources */,
 				BB2EDF4E296E63E5003BCF58 /* KMPageEditInsertCustomPageWindowController.swift in Sources */,