CancelAuthRequest.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using Edge.Core.Parser.BinaryParser.Attributes;
  2. using HengshanPaymentTerminal.Support;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. namespace HengshanPaymentTerminal.MessageEntity.Incoming
  7. {
  8. public class CancelAuthRequest : CardMessageBase
  9. {
  10. public CancelAuthRequest() : base(Command.CancelAuthRequest)
  11. {
  12. }
  13. [Format(4, EncodingType.BcdString, -90)]
  14. public string TerminalId { get; set; }
  15. [Format(10, EncodingType.BcdString, -89)]
  16. public string Asn { get; set; }
  17. [Format(7, EncodingType.BcdString, -88)]
  18. public string TransactionTime { get; set; }
  19. [Format(4, EncodingType.BIN, -87)]
  20. public int PosTtc { get; set; }
  21. [Format(2, EncodingType.BIN, -86)]
  22. public ushort SeqNo { get; set; }
  23. /// <summary>
  24. /// AccountType
  25. /// 0x50表示实际金额中得定量数目单位为0.01元,0x51表示实际金额中得定量数目单位为0.01升
  26. /// </summary>
  27. [Format(1, EncodingType.BIN, -85)]
  28. public byte PresetType { get; set; }
  29. [Format(2, EncodingType.HexString, -84)]
  30. public string FPCode { get; set; }
  31. [Format(3, EncodingType.HexString, -83)]
  32. public string CardInfo { get; set; }
  33. [Format(1, EncodingType.BIN, -82)]
  34. public byte PaymentType { get; set; }
  35. public CardInfo CurrentCardInfo
  36. {
  37. get
  38. {
  39. return new CardInfo
  40. {
  41. CardType = CardInfo.Substring(0, 2).ToByte(),
  42. CardCtc = CardInfo.Substring(2, 4).ToUInt16()
  43. };
  44. }
  45. }
  46. public FuelingPointCode FuelingPoint
  47. {
  48. get
  49. {
  50. return new FuelingPointCode
  51. {
  52. NozzleNo = FPCode.Substring(0, 2).ToByte(),
  53. PumpNo = FPCode.Substring(2, 2).ToByte()
  54. };
  55. }
  56. }
  57. }
  58. }