SendCardBalanceToCardReader.cs 980 B

123456789101112131415161718192021222324
  1. using Wayne.Lib.StateEngine;
  2. using WayneChina_IcCardReader_SinoChem.MessageEntity;
  3. using WayneChina_IcCardReader_SinoChem.MessageEntity.Outgoing;
  4. namespace SinochemInternetPlusApp.States.ICCardMode
  5. {
  6. public class SendCardBalanceToCardReader : SendCardReaderCommandBase
  7. {
  8. protected override void Enter(StateEntry stateEntry, ref Transition transition)
  9. {
  10. CreateCommand();
  11. base.Enter(stateEntry, ref transition);
  12. transition = new Transition(this, TransitionType.Done); //Transition out directly.
  13. }
  14. protected override IcCardReaderMessageBase CreateCommand()
  15. {
  16. return new TcpCardOnlineVerificationResultRequest(VerificationResult.Success, (decimal)Main.CurrentEpsTrx.Model.balance_before_trx, "");
  17. }
  18. protected override int TimeoutInterval =>
  19. TimeoutValues.GetValueInMilliSec(TimeoutValues.FuelingPoint.ICCardMode_SendCardBalanceToCardReader, 10);
  20. }
  21. }