fix: 恢复抖音过期支付并完善原生状态确认
This commit is contained in:
@@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user