fix
杨锴
2025-05-06 fdb1d18a0b4b941b986d55f66c589e29836494eb
DolphinEnglishLearnStudent/Services/InPurchaseManager.swift
@@ -110,27 +110,28 @@
                        }
            }
            //            func getIPAPrice(_ price:Int,clouse:@escaping (SKProduct)->Void){
            //                        var ipaId = ""
            //                        switch price {
            //                                    case 98: ipaId = "com.jkfitness.a.price.1"
            //                                    case 298:ipaId = "com.jkfitness.a.price.2"
            //                                    case 488:ipaId = "com.jkfitness.a.price.3"
            //                                    case 698:ipaId = "com.jkfitness.a.price.4"
            //                                    case 998:ipaId = "com.jkfitness.a.price.5"
            //                                    default:break
            //                        }
            //
            //                        var productIds = Set<String>()
            //                        productIds.insert(ipaId)
            //
            //                        InPurchaseManager.instance().setProductList(productIds) {products in
            //                                    if let product = products.first{
            //                                                clouse(product)
            //                                    }
            //                        }
            //            }
         static   func testrefundRequest(for transactionID:UInt64) async{
                        do{
                                    if #available(iOS 15.0, *) {
                                                let windowScene = await UIApplication.shared.connectedScenes.first
                                                let result = try await   StoreKit.Transaction.beginRefundRequest(for: transactionID, in: windowScene as! UIWindowScene)
                                                switch result {
                                                            case .success:
                                                                        alert(msg: "退款申请发起成功")
                                                            case .userCancelled:break
                                                            @unknown default:break
                                                }
                                    } else {
                                                // Fallback on earlier versions
                                    }
                        }catch{ error
                                    print(error)
                        }
            }
            func dismiss(){
                        InPurchaseManager._sharedInstance = nil