Impliment soft-payments

This commit is contained in:
2026-03-08 19:28:10 -07:00
parent 54ea7c3027
commit 78bdf250ff
7 changed files with 114 additions and 12 deletions
@@ -0,0 +1,27 @@
namespace Controllers.Payment {
public class PaymentTestor : IPayment {
public static List<string> ImpodentKeys = new List<string>();
public (bool, string) CreatePayment() {
string guid = Guid.NewGuid().ToString();
ImpodentKeys.Add(guid);
return (true, guid);
}
public (bool, string) TryPayment(string ImpodentKey, float Price) {
try {
if (ImpodentKeys.Contains(ImpodentKey)) {
ImpodentKeys.Remove(ImpodentKey);
return (true, "");
} else {
return (false, "Payment session closed or never existed");
}
}catch(Exception e) {
return (false, e.ToString());
}
}
}
}