forgot to include callback url in epay hash calculation

This commit is contained in:
Thomas Steen Rasmussen 2016-05-29 16:23:24 +02:00
parent 018723f27d
commit 8a0eaa0c0b

View file

@ -4,7 +4,7 @@ from django.conf import settings
def calculate_epay_hash(order, request): def calculate_epay_hash(order, request):
hashstring = ( hashstring = (
'{merchant_number}{description}11{amount}DKK' '{merchant_number}{description}11{amount}DKK'
'{order_id}{accept_url}{cancel_url}{md5_secret}' '{order_id}{accept_url}{cancel_url}{callback_url}{md5_secret}'
).format( ).format(
merchant_number=settings.EPAY_MERCHANT_NUMBER, merchant_number=settings.EPAY_MERCHANT_NUMBER,
description=order.description, description=order.description,
@ -12,6 +12,7 @@ def calculate_epay_hash(order, request):
order_id=order.pk, order_id=order.pk,
accept_url = order.get_epay_accept_url(request), accept_url = order.get_epay_accept_url(request),
cancel_url = order.get_cancel_url(request), cancel_url = order.get_cancel_url(request),
callback_url = order.get_epay_callback_url(request),
md5_secret=settings.EPAY_MD5_SECRET, md5_secret=settings.EPAY_MD5_SECRET,
) )
epay_hash = hashlib.md5(hashstring).hexdigest() epay_hash = hashlib.md5(hashstring).hexdigest()