tell epay to send the user to our thanks url after payment
This commit is contained in:
parent
32779b662e
commit
96582c93ae
|
@ -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()
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue