def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data['transId'] transaction.meta = data if int(data['status']) == 1: transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data['token'] transaction.meta = data if 'resultCode' in data and int(data['resultCode']) == 100: transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data["Token"] transaction.meta = data if "status" in data and int(data["status"]) == 0: transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data["bill_id"] transaction.meta = data if data["state"] in ("pay", "request"): transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data['bill_id'] transaction.meta = data if data['state'] in ('pay', 'request'): transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data['Token'] transaction.meta = data if 'status' in data and int(data['status']) == 0: transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data["RefId"] transaction.meta = data if int(data["ResCode"]) == 0: transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data['Authority'] transaction.meta = data if data['Status'] == 'OK': transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data["Authority"] transaction.meta = data if data["Status"] == "OK": transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data['id'] transaction.meta = data transaction.validate_status = data.get('validateStatus', True) print('Transaction validated: \n%s' % transaction.__repr__()) return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data["token"] transaction.meta = data if "resultCode" in data and int(data["resultCode"]) == 100: transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data["id"] transaction.meta = data transaction.validate_status = data.get("validateStatus", True) print("Transaction validated: \n%s" % transaction.__repr__()) return transaction
def validate_transaction(self, data: dict) -> Transaction: parsed_data = self._parse_callback_data(data) transaction = Transaction() transaction.id = parsed_data['ref_id'] transaction.meta = parsed_data if int(parsed_data['res_code']) == 0: transaction.validate_status = True return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data.get("transid") transaction.amount = int(data.get("amount", 0)) transaction.pan = data.get("cardnumber") transaction.meta = data transaction.validate_status = transaction.id is not None return transaction
def validate_transaction(self, data: dict) -> Transaction: transaction = Transaction() transaction.id = data["token"] transaction.meta = data transaction.validate_status = int(data["status"]) == 1 return transaction