fix: 恢复抖音过期支付并完善原生状态确认

This commit is contained in:
Codex
2026-09-09 16:29:30 +08:00
parent fd3dc6870a
commit 2e9a732f9d
9 changed files with 142 additions and 19 deletions
@@ -12,6 +12,13 @@ public class TbDouyinPayNative {
public static func available() -> Bool { DypayAPI.canOpenDypay() }
public static func resetPending() {
DispatchQueue.main.async {
generation = UUID()
pending = nil
}
}
public static func pay(_ payload: String, _ done: @escaping (String) -> Void) {
DispatchQueue.main.async {
guard pending == nil else {
@@ -34,8 +41,8 @@ public class TbDouyinPayNative {
DypayAPI.openDypay(withInfo: info, from: controller) { result in
finish(result as? [AnyHashable: Any], ticket)
}
// Keep a native lock after timeout: a late URL callback cannot identify a new order.
// The host must query the pending order rather than immediately initiate another pay.
// Only authenticated server reconciliation can release a missing callback's lock.
// URL callbacks are hints, never payment success; the host always queries its saved order.
}
}