Fix multi-bill display, charge amount parsing, and charge log responses

- chargeoptions is the real field gating 2000/5000/10000 yen display
- chargeid (not chargenum) carries the actual denomination on charge
- getrecentcharge/getlastlog: fixed num mismatch, added missing result
  section, and added placeholder items for empty result sets
This commit is contained in:
Kayori
2026-09-07 02:14:14 +02:00
parent 68b77bb9c3
commit e5bdb3eb95
8 changed files with 137 additions and 24 deletions
@@ -8,6 +8,14 @@ public class ChargeRequest
[XmlElement("chargenum")]
public required string ChargeNumber { get; set; }
// The actual denomination, not chargenum - real traffic (spice2x
// "automap" capture) shows chargenum is always the quantity ("1" for a
// single bill), while chargeid carries the value as e.g. "N10000P"
// (Note/10000/Paseli). chargenum * 1000 alone reports every bill as
// 1000 yen regardless of what was actually inserted.
[XmlElement("chargeid")]
public required string ChargeId { get; set; }
[XmlElement("sessid")]
public required string SessionId { get; set; }
}
@@ -5,6 +5,9 @@ namespace MedusaPluginChargeMachine.Models.Request;
[XmlRoot("eacharge")]
public class GetRecentChargeRequest
{
[XmlElement("num")]
public string? Num { get; set; }
[XmlElement("sessid")]
public string? SessionId { get; set; }