tell epay to send the user to our thanks url after payment

This commit is contained in:
Thomas Steen Rasmussen 2016-05-16 21:45:34 +02:00
parent 32779b662e
commit 96582c93ae
2 changed files with 2 additions and 1 deletions

View file

@ -176,3 +176,4 @@ class EpayPayment(CreatedUpdatedModel, UUIDModel):
order = models.OneToOneField('shop.Order') order = models.OneToOneField('shop.Order')
callback = models.ForeignKey('shop.EpayCallback') callback = models.ForeignKey('shop.EpayCallback')
txnid = models.IntegerField() txnid = models.IntegerField()

View file

@ -246,7 +246,7 @@ class EpayFormView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, DetailView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
order = self.get_object() order = self.get_object()
accept_url = 'https://' + self.request.get_host() + str(order.get_absolute_url()) accept_url = 'https://' + self.request.get_host() + str(reverse_lazy('epay_thanks', kwargs={'pk': order.pk}))
amount = order.total * 100 amount = order.total * 100
order_id = str(order.pk) order_id = str(order.pk)
description = "BornHack 2016 order #%s" % order.pk description = "BornHack 2016 order #%s" % order.pk