Tests and package name updated

This commit is contained in:
Savya Bikram Shah
2026-05-07 17:42:48 +05:45
parent 9f620084b2
commit 6a8a6e46f0
93 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
using UnityEditor;
namespace Darkmatter.Fonepay.Editor
{
[InitializeOnLoad]
internal static class FonepayStartupCheck
{
private const string SessionFlag = "Darkmatter.Fonepay.StartupChecked";
private const string ConfigAssetPath = "Assets/Resources/FonepayConfig.asset";
static FonepayStartupCheck()
{
EditorApplication.delayCall += RunOnce;
}
private static void RunOnce()
{
if (SessionState.GetBool(SessionFlag, false)) return;
SessionState.SetBool(SessionFlag, true);
var so = AssetDatabase.LoadAssetAtPath<FonepayConfigSO>(ConfigAssetPath);
var hasConfig = so != null
&& !string.IsNullOrEmpty(so.MerchantCode)
&& !string.IsNullOrEmpty(so.Username);
var hasSecrets = FonepaySecretsStore.HasAll();
if (!hasConfig || !hasSecrets)
FonepaySettingsWindow.Open();
}
}
}