diff --git a/kuma/payments/jinja2/payments/payment_terms.html b/kuma/payments/jinja2/payments/payment_terms.html new file mode 100644 index 0000000000..13069fc65b --- /dev/null +++ b/kuma/payments/jinja2/payments/payment_terms.html @@ -0,0 +1,21 @@ +{% extends 'base.html' %} + +{% block title %}{{ page_title(_('MDN Payment terms')) }}{% endblock %} + +{% block site_meta %} + {{ super() }} + {% set seo_description = _('MDN Payment terms') %} + {% set social_title = _('MDN Payment terms') %} + + + + + +{% endblock %} + + +{% block content %} + +

{{ _('MDN Payment terms') }}

+ +{% endblock %} diff --git a/kuma/payments/tests/test_views.py b/kuma/payments/tests/test_views.py index 0369cf04a3..69ce63e2fd 100644 --- a/kuma/payments/tests/test_views.py +++ b/kuma/payments/tests/test_views.py @@ -17,6 +17,16 @@ def test_contribute_view(mock_enabled, client, settings): assert response.status_code == 200 +@pytest.mark.django_db +@mock.patch('kuma.payments.views.enabled') +def test_payment_terms_view(mock_enabled, client, settings): + """If enabled, contribution page is returned.""" + mock_enabled.return_value = True + response = client.get(reverse('payment_terms')) + assert_no_cache_header(response) + assert response.status_code == 200 + + @pytest.mark.django_db @mock.patch('kuma.payments.views.enabled') def test_thanks_view(mock_enabled, client, settings): diff --git a/kuma/payments/urls.py b/kuma/payments/urls.py index 2e124d1fa2..ecad71328d 100644 --- a/kuma/payments/urls.py +++ b/kuma/payments/urls.py @@ -14,5 +14,8 @@ name='recurring_payment_initial'), url(r'^recurring/subscription/?$', views.contribute_recurring_payment_subscription, - name='recurring_payment_subscription') + name='recurring_payment_subscription'), + url(r'^terms/?$', + views.payment_terms, + name='payment_terms'), ] diff --git a/kuma/payments/views.py b/kuma/payments/views.py index bb1654b7d2..26d2cdeb15 100644 --- a/kuma/payments/views.py +++ b/kuma/payments/views.py @@ -128,3 +128,9 @@ def contribute_recurring_payment_subscription(request): 'recurring_payment': True } return render(request, 'payments/payments.html', context) + + +@skip_if_disabled +@never_cache +def payment_terms(request): + return render(request, 'payments/payment_terms.html')