class EftData(object):
    def __init__(self, pos_id, session, activity_type, success_flag, amount="", result_xml="", authcode="", orderid="", cardno=""):
        self.pos_id = pos_id
        self.session = session
        self.activity_type = activity_type
        self.success_flag = success_flag
        self.amount = amount
        self.result_xml = result_xml
        self.authcode = authcode
        self.orderid = orderid
        self.cardno = cardno

    def to_payload(self):
        return '\0'.join(map(str, (self.session, self.activity_type, self.success_flag, self.amount, self.result_xml,
                                   self.authcode, self.orderid, self.cardno)))
