encode to utf8 before hashing

This commit is contained in:
Thomas Steen Rasmussen 2017-04-11 08:19:18 +02:00
parent a71cd34f1f
commit 2550b99b2b

View file

@ -15,7 +15,7 @@ def calculate_epay_hash(order, request):
callback_url = order.get_epay_callback_url(request),
md5_secret=settings.EPAY_MD5_SECRET,
)
epay_hash = hashlib.md5(hashstring).hexdigest()
epay_hash = hashlib.md5(hashstring.encode('utf-8')).hexdigest()
return epay_hash