feat: 支付验签框架 — 策略模式 + 装饰器重试
- 新增 IPaymentVerifier 接口 (Verify + Consume),渠道无关 - 新增 PaymentVerifierFactory 按 Channel 分发 - 新增 FlexionPaymentVerifier: HTTP 验签 + 线性 backoff 重试 - 新增 DummyPaymentVerifier: 占位验签实现 - 新增 RetryablePaymentVerifier: 装饰器,流程级重试 - TYSdkFacade_Pay: PayResult 增加验签分支,先验签后消费再回调 - TYSdkModel: PaymentInfo 增加 verified 字段 - UnityBridgeFunc: 移除 ConsumeFlexionPurchase(职责收归 Verifier) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -168,14 +168,6 @@ namespace tysdk
|
||||
}
|
||||
}
|
||||
|
||||
public static void ConsumeFlexionPurchase(string token)
|
||||
{
|
||||
using (var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("ConsumeFlexionPurchase", token);
|
||||
}
|
||||
}
|
||||
|
||||
public static void UnityKnow(String productId, String productName, String productCount, String prodorderId, String appInfo)
|
||||
{
|
||||
using (var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
|
||||
Reference in New Issue
Block a user