123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922 |
- //
- // KMPurchaseEmbeddedWindowController.swift
- // PDF Reader Pro
- //
- // Created by wanjun on 2024/8/29.
- //
- import Cocoa
- // paypal alipay wxpay paddle
- @objc enum KMPaymentType: UInt32 {
- case paypal = 1
- case alipay
- case wxpay
- case paddle
- }
- class KMPurchaseEmbeddedWindowController: NSWindowController {
- override func windowDidLoad() {
- super.windowDidLoad()
- // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-
- #if DEBUG
- let btn = NSButton()
- let wh: CGFloat = 100
- let x = (NSWidth(self.window?.frame ?? .zero) - wh) * 0.5
- let y = (NSHeight(self.window?.frame ?? .zero) - wh) * 0.5
- btn.frame = NSMakeRect(x, y, wh, wh)
-
- btn.target = self
- btn.action = #selector(btnAction)
- self.window?.contentView?.addSubview(btn)
- #endif
- }
-
- override func showWindow(_ sender: Any?) {
- NSApp.runModal(for: self.window!)
- }
-
- @objc func btnAction() {
- // 升级产品
- let productCode = "com.brother.pdfreaderpro.windows.product_1"
- let email = "tangchao@kdanmobile.com"
- self._buyProduct(productCode, count: 1, discountId: "", payment: .alipay, license: "", email: email, username: "") { [weak self] info, err in
- // // paypal_order
- // // page_pay_url 链接
- // // https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-3V503434MD108282U
- // // trade_no 订单id 用于校验订单 【22024083006591098】
- if let dataInfo = info {
- let trade_no = info?["trade_no"]
- let page_pay_url = info?["page_pay_url"]
- DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
- self?._getOrderStatus(tradeNo: trade_no as? String ?? "", callback: { info, err in
- KMPrint("")
- })
- }
- } else {
- // 数据错误
- }
- }
- // let discountId = "E85B-9C31-6EAB"
- // self._getDiscount(productId: productCode, discountId: discountId) { info, err in
- // if let dataInfo = info {
- // let status = dataInfo["status"] as? String ?? ""
- // if status == "unused" {
- // // 折扣(eg. 0.7)
- // let discount = dataInfo["discount"]
- // // 价格 (应该是美元)
- // let price = dataInfo["price"]
- // }
- // }
- // }
- // self._getProductDatas { info, err in
- /*
- activity_cny_price 优惠价(人民币)
- activity_price 优惠价(美元)
- price 原价(美元)
- cny_price 原价(人民币)
- */
- // }
- }
-
- // 获取价格
- private func _getProductDatas(callback: @escaping (([String:Any]?, Any?)->Void)) {
- // func getPriceUrl() {
- let urlString = kVerificationServer + "/api/product/get-price/v2"
- KMAdvertisementRequestServer.requestServer.request(urlString: urlString, method: "GET", params: nil) { task, responseObject, error in
- if (error == nil && responseObject != nil) {
- let array = responseObject?["data"] as? NSDictionary
- if array != nil {
- //解析数据
- let productsDict = array?.object(forKey: "data") as? NSDictionary
- callback(productsDict as? [String : Any], nil)
- } else {
- callback([:], error.debugDescription)
- }
- } else {
- callback(nil, error.debugDescription)
- }
- }
- }
-
- // 获取优惠卷
- private func _getDiscount(productId: String, discountId: String, callback: @escaping (([String : Any]?, Any?)->Void)) {
- let urlString = kVerificationServer + "/api/coupons/retrieval"
- let app_code = MainBundle.km_infoDictionary()?["CFBundleIdentifier"] ?? ""
- let params = [
- // 优惠卷id
- "code" : discountId,
- "app_code" : app_code,
- "product_code" : productId]
- KMAdvertisementRequestServer.requestServer.request(urlString: urlString, method: "GET", params: params) { task, responseObject, error in
- if (error == nil && responseObject != nil) {
- if let dataDict = responseObject?["data"] as? NSDictionary {
- callback(dataDict as? [String : Any], nil)
- } else {
- callback([:], error.debugDescription)
- }
- } else {
- callback(nil, error.debugDescription)
- }
- }
- }
-
- // 获取订单状态
-
- private func _getOrderStatus(tradeNo: String, callback: @escaping (([String:Any]?, Any?)->Void)) {
- let urlString = kVerificationServer + "/api/orders/getOrderStatus"
- var jsonStr: String = ""
- if let jsonData = try?JSONSerialization.data(withJSONObject: ["trade_no" : tradeNo], options:[]),
- let data = String(data: jsonData, encoding: .utf8) {
- jsonStr = data
- }
-
- let rsa = KMVerificationRSA()
- let publicKey = rsa.loadPublicKey()
- let encryptedData = rsa.encrypt(plainText: jsonStr, publicKey: publicKey!)
- let tokenStr = encryptedData?.base64EncodedString()
-
- var postData = try!JSONSerialization.data(withJSONObject: ["token" : tokenStr])
- 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")
- request.httpMethod = "POST"
- request.httpBody = postData
- let task = URLSession.shared.dataTask(with: request) { data, response, error in
- guard let data = data else {
- callback(nil, String(describing: error))
- return
- }
- if let jsonDict = try?JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary ?? [:] {
- let dataStr = jsonDict["data"] as? String
-
- let rsa = KMVerificationRSA()
- if let deData = (rsa.decrypt(source: dataStr as? NSString ?? "") as? String)?.data(using: .utf8) {
- if let dict = try?JSONSerialization.jsonObject(with: deData, options: []) as? NSDictionary ?? [:] {
- return callback(dict as? [String : Any], nil)
- }
- }
- callback([:], String(describing: error))
- } else {
- // 数据错误
- callback([:], String(describing: error))
- }
- }
- task.resume()
- }
-
- private func _buyProduct(_ productId: String, count: Int, discountId: String = "", payment: KMPaymentType, license: String = "", email: String, username: String = "", callback: @escaping (([String:Any]?, Any?)->Void)) {
- let urlString = kVerificationServer + "/api/subscriptions"
- let app_code = MainBundle.km_infoDictionary()?["CFBundleIdentifier"] ?? ""
- let paymentStr = self._paymentTypeString(type: payment)
- let paraDict = ["data" :
- ["product_code": productId,
- "app_code": app_code,
- // 购买数量
- "amount": "\(count)",
- // 优惠卷id
- "coupon_code": discountId,
- // 支付类型 paypal alipay wxpay paddle
- "payment": paymentStr,
- // 地区
- "customer_country": "US",
- // 邮编码
- "customer_postcode" : "20001",
- "unique_sn" : uuid(),
- // 序列码 标准包 升级 高级包 需要
- "upgrade_cdkey" : license,
- "email" : email,
- // 用户名
- "contact_name" : username]]
- var postData = try! JSONSerialization.data(withJSONObject: paraDict)
- 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")
- request.httpMethod = "POST"
- request.httpBody = postData
- let task = URLSession.shared.dataTask(with: request) { data, response, error in
- guard let theData = data else {
- callback(nil, String(describing: error))
- return
- }
- if let jsonDict = try? JSONSerialization.jsonObject(with: theData, options: []) as? NSDictionary ?? [:] {
- let data1: NSDictionary = jsonDict["data"] as? NSDictionary ?? [:]
- let subscriptionInfo = data1.object(forKey: "subscription") as? NSDictionary
- let orderKey = self._paymentTypeString(type: payment) + "_order"
- let order_info = subscriptionInfo?.object(forKey: orderKey) as? NSDictionary
- if let dataInfo = order_info, dataInfo.count > 0 {
- callback(dataInfo as? [String : Any], nil)
- } else {
- // 数据错误
- callback([:], String(describing: error))
- }
- } else {
- // 数据错误
- callback([:], String(describing: error))
- }
- }
- task.resume()
- }
-
- // MARK: Private
-
- private func uuid() -> String {
- return GetHardwareUUID()!
- }
-
- private func _paymentTypeString(type: KMPaymentType) -> String {
- if type == .paddle {
- return "paddle"
- } else if type == .alipay {
- return "alipay"
- } else if type == .wxpay {
- return "wxpay"
- } else if type == .paddle {
- return "paddle"
- }
- return ""
- }
-
- }
- // /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
- /*
- ▿ Optional<AnyObject>
- ▿ some : 2 elements
- ▿ 0 : 2 elements
- - key : app_code
- - value : com.brother.pdfreaderprofree.windows
- ▿ 1 : 2 elements
- - key : data
- ▿ value : 12 elements
- ▿ 0 : 2 elements
- - key : id
- - value : 5851c5d6-f43e-32b2-8660-a6222194fee4
- ▿ 1 : 2 elements
- - key : discount
- - value : <null>
- ▿ 2 : 2 elements
- - key : member
- ▿ value : 2 elements
- ▿ 0 : 2 elements
- - key : email
- - value : sec-2@drmail.in
- ▿ 1 : 2 elements
- - key : full_name
- - value : test-nilvbo2
- ▿ 3 : 2 elements
- - key : coupon_provider
- ▿ value : 15 elements
- ▿ 0 : 2 elements
- - key : id
- - value : 291
- ▿ 1 : 2 elements
- - key : category
- - value : presented
- ▿ 2 : 2 elements
- - key : start_date
- - value : <null>
- ▿ 3 : 2 elements
- - key : limit_product
- - value : 0
- ▿ 4 : 2 elements
- - key : total_amount
- - value : 59502
- ▿ 5 : 2 elements
- - key : rcode
- - value :
- ▿ 6 : 2 elements
- - key : end_date
- - value : <null>
- ▿ 7 : 2 elements
- - key : created_at
- - value : 2024-05-24 07:20:21
- ▿ 8 : 2 elements
- - key : discount
- - value : <null>
- ▿ 9 : 2 elements
- - key : limit_product_code
- - value :
- ▿ 10 : 2 elements
- - key : minimum_charge
- - value : 59.99
- ▿ 11 : 2 elements
- - key : price
- - value : 15
- ▿ 12 : 2 elements
- - key : valid_period
- - value : 336.hours
- ▿ 13 : 2 elements
- - key : product_id
- - value : 15
- ▿ 14 : 2 elements
- - key : received_amount
- - value : 39
- ▿ 4 : 2 elements
- - key : expire_date
- - value : 1718857051
- ▿ 5 : 2 elements
- - key : created_at
- - value : 2024-06-06 04:17:31
- ▿ 6 : 2 elements
- - key : source_type
- - value : event
- ▿ 7 : 2 elements
- - key : minimum_charge
- - value : 59.99
- ▿ 8 : 2 elements
- - key : price
- - value : 15
- ▿ 9 : 2 elements
- - key : coupon_provider_id
- - value : 291
- ▿ 10 : 2 elements
- - key : code
- - value : E85B-9C31-6EAB
- ▿ 11 : 2 elements
- - key : status
- - value : expired
- */
|