package ttk.commands;

import device.Pinpad;
import tlv.TlvItem;
import ttk.Util;

public class CashoutInTst extends CommandBase {
    private int amount;

    public CashoutInTst(Pinpad pinpad, int amount){
        super(pinpad);
        this.amount = amount;
    }

    @Override
    protected void prepare(){
        try {
            context.add(new TlvItem(tlv.Tag.findTag("TAG_TTK_CLIENT_MID"), "CST"));
            context.add(new TlvItem(tlv.Tag.findTag("TAG_TTK_CLIENT_AMT"), Util.intToString(amount, 12)));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
