fix:1、接入合作方的sdk。2、支付逻辑接入sdk中的接口

This commit is contained in:
2026-05-09 09:37:34 +08:00
parent 1599bf4bbb
commit ee55c03120
1011 changed files with 167108 additions and 33552 deletions
@@ -0,0 +1,53 @@
using System;
using KwaiAds.Scripts.Common;
namespace KwaiAds.Scripts.Api
{
public static class KwaiAdsSdk
{
private static IClientFactory _clientFactory;
private static ISDK _sdk;
internal static ISDK SDK
{
get
{
if (_sdk == null)
{
_sdk = GetClientFactory().BuildSDKClient();
}
return _sdk;
}
}
internal static IClientFactory GetClientFactory()
{
if (_clientFactory != null)
{
return _clientFactory;
}
_clientFactory =
#if UNITY_ANDROID
new KwaiAds.Scripts.Platforms.Android.AndroidClientFactory();
#else
null;
throw new PlatformNotSupportedException();
#endif
return _clientFactory;
}
/// Starts the Kwai SDK
/// @warning Call this method as early as possible to reduce ad request fail.
/// @param config SDK configuration
/// @param callback Callback for starting the Kwai SDK
/// ////
public static void Initialize(KwaiAdConfig config, InitResultCallback initResultCallback)
{
SDK.Init(config, initResultCallback);
}
}
}