feat(can-charge): 이롬넷(Payverse) 통합결제 추가

This commit is contained in:
Yu Sung
2025-10-01 01:48:18 +09:00
parent e62c89d7bc
commit d045722b8d
13 changed files with 639 additions and 72 deletions

View File

@@ -107,4 +107,8 @@ final class AppViewModel: ObservableObject {
.store(in: &subscription)
}
}
func handlePayverseOpenURL(_ url: URL) {
}
}

View File

@@ -17,9 +17,11 @@ struct SodaLiveApp: App {
@ObservedObject var viewModel = AppViewModel()
@StateObject var canPgPaymentViewModel = CanPgPaymentViewModel()
var body: some Scene {
WindowGroup {
ContentView()
ContentView(canPgPaymentViewModel: canPgPaymentViewModel)
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)) { _ in
CreatorCommunityMediaPlayerManager.shared.pauseContent()
}
@@ -34,8 +36,16 @@ struct SodaLiveApp: App {
}
.onOpenURL { url in
DEBUG_LOG("I have received a URL through a custom scheme! \(url.absoluteString)")
ApplicationDelegate.shared.application(UIApplication.shared, open: url, options: [:])
AppsFlyerLib.shared().handleOpen(url)
if let comps = URLComponents(url: url, resolvingAgainstBaseURL: false),
url.scheme?.lowercased() == APPSCHEME.lowercased(),
comps.host?.lowercased() == "payverse",
comps.path.lowercased() == "/result" {
canPgPaymentViewModel.handleVerifyOpenURL(url)
} else {
ApplicationDelegate.shared.application(UIApplication.shared, open: url, options: [:])
AppsFlyerLib.shared().handleOpen(url)
}
}
}
}