mirror of
https://gitea.tendokyu.moe/Kayori/MedusaPluginChargeMachine.git
synced 2026-10-08 23:09:47 +03:00
- GetConfigEaChargeHandler: was declared as Handler<EmptyRequest, T>, which made HandlerService attempt to XML-deserialize an EmptyRequest against the incoming <eacharge> root, crashing on every getconf call. Switched to HandlerWithoutRequest<T>, matching every other parameterless handler (e.g. SppassOpenHandler). - ChargeMachinePlugin.DoesProfileExist: was a synchronous Func<bool>, but PluginService.DoesProfileExistAsync casts the DynamicInvoke result to Task<bool>, throwing InvalidCastException on every card inquire. Now returns Task.FromResult(true) - a PASELI profile always exists once a user is created, so this plugin never needs to report "no profile" here. - EaChargeConfigResponse: dropped the multibills/readagreement fields entirely and fixed articlelist's XML shape. A real getconf response (captured via spice2x's automap against the genuine Konami server) has neither field at all, and wraps articlelist entries in <item> children rather than repeating sibling <articlelist> elements. The denomination-button limitation this was chasing turned out to be an unrelated spice2x bill-validator emulation gap (see spice2x issue #123), not anything server-side. - GetConfigEaChargeHandler: DOCMT_* article types now send an empty articledoc, matching the real server - the disclosure/agreement text is rendered client-side from a bundled asset, not delivered over the wire. Sending real text there produced a solid black screen on a real cabinet instead of the disclosure text. Claude-Session: https://claude.ai/code/session_012FiU5Qe8fbePFxraxWHSd5
62 lines
1.6 KiB
C#
62 lines
1.6 KiB
C#
using System.Xml.Serialization;
|
|
using Abstractions.SerializationTypes;
|
|
|
|
namespace MedusaPluginChargeMachine.Models.Response;
|
|
|
|
[XmlRoot("eacharge")]
|
|
[Serializable]
|
|
public class EaChargeConfigResponse
|
|
{
|
|
[XmlAttribute("status")]
|
|
public required int Status { get; set; }
|
|
|
|
[XmlAttribute("expire")]
|
|
public required int Expire { get; set; }
|
|
|
|
[XmlElement("chargearticle")]
|
|
public required EaChargeConfigChargeArticle ChargeArticle { get; set; }
|
|
|
|
[XmlElement("chargedetail")]
|
|
public required EaChargeConfigChargeDetail ChargeDetail { get; set; }
|
|
|
|
[XmlElement("chargestatus")]
|
|
public required EaChargeConfigChargeStatus ChargeStatus { get; set; }
|
|
}
|
|
|
|
public record EaChargeConfigChargeArticle
|
|
{
|
|
[XmlElement("articlerevision")]
|
|
public required XrpcString ArticleRevision { get; set; }
|
|
|
|
[XmlArray("articlelist")]
|
|
[XmlArrayItem("item")]
|
|
public required List<EaChargeConfigChargeArticleItem> ArticleList { get; set; }
|
|
}
|
|
|
|
public record EaChargeConfigChargeArticleItem
|
|
{
|
|
[XmlElement("articletype")]
|
|
public required XrpcString ArticleType { get; set; }
|
|
|
|
[XmlElement("articledoc")]
|
|
public required XrpcString ArticleDoc { get; set; }
|
|
}
|
|
|
|
public record EaChargeConfigChargeDetail
|
|
{
|
|
[XmlElement("chargedaily")]
|
|
public required XrpcInt ChargeDaily { get; set; }
|
|
|
|
[XmlElement("chargedailylimit")]
|
|
public required XrpcInt ChargeDailyLimit { get; set; }
|
|
}
|
|
|
|
public record EaChargeConfigChargeStatus
|
|
{
|
|
[XmlElement("currentcode")]
|
|
public required XrpcInt CurrentCode { get; set; }
|
|
|
|
[XmlElement("lastchargestatus")]
|
|
public required XrpcInt LastChargeStatus { get; set; }
|
|
}
|