def generate_md5_signature(status_report): m = hashlib.md5() m.update(str(status_report.merchant_id)) m.update(str(status_report.transaction_id)) m.update(get_secret_word_as_md5()) m.update(str(status_report.mb_amount)) m.update(status_report.mb_currency) m.update(str(status_report.status)) return m.hexdigest().upper()
def generate_md5_signature(status_report): m = hashlib.md5() m.update(str(status_report.merchant_id)) m.update(str(status_report.transaction_id)) m.update(get_secret_word_as_md5()) m.update(str(status_report.mb_amount)) m.update(status_report.mb_currency) m.update(str(status_report.status)) return m.hexdigest().upper()
def generate_md5_signature(self): m = hashlib.md5() m.update(str(self.data['merchant_id'])) m.update(str(self.data['transaction_id'])) m.update(get_secret_word_as_md5()) m.update(str(self.data['mb_amount'])) m.update(self.data['mb_currency']) m.update(str(self.data['status'])) self.data['md5sig'] = m.hexdigest().upper()