more work on payments
This commit is contained in:
parent
ce98d97d74
commit
1fb5454590
15
shop/templates/bank_transfer.html
Normal file
15
shop/templates/bank_transfer.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>Pay by Bank Transfer</h2>
|
||||
|
||||
<p class="lead">
|
||||
IBAN: DKnoget
|
||||
Swift: nogetandet
|
||||
</p>
|
||||
|
||||
<p>Note: It might take several days before we register your bank transfer, especially if you are outside of SEPA region.</p>
|
||||
|
||||
{% endblock %}
|
13
shop/templates/epay_thanks.html
Normal file
13
shop/templates/epay_thanks.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Thank you for your payment!</h2>
|
||||
<p class="lead">
|
||||
{% if order.paid %}
|
||||
Thank you for your payment. Your order has been marked as paid.
|
||||
{% else %}
|
||||
Thank you for your payment. Your order will be marked as paid as soon as we register a callback from our payment provider.</p>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endblock %}
|
|
@ -316,6 +316,21 @@ class EpayCallbackView(View):
|
|||
return HttpResponse('OK')
|
||||
|
||||
|
||||
class BankTransferView(TemplateView):
|
||||
template_name = 'epay_form.html'
|
||||
class EpayThanksView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, DetailView):
|
||||
model = Order
|
||||
template_name = 'epay_thanks.html'
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if order.open:
|
||||
### this order is open, what is the user doing here?
|
||||
return HttpResponseRedirect(reverse_lazy('shop:order_detail', kwargs={'pk': order.pk}))
|
||||
|
||||
return super(EpayThanksView, self).dispatch(
|
||||
request, *args, **kwargs
|
||||
)
|
||||
|
||||
|
||||
class BankTransferView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, DetailView):
|
||||
model = Order
|
||||
template_name = 'bank_transfer.html'
|
||||
|
||||
|
|
Loading…
Reference in a new issue