diff --git a/app/config.py b/app/config.py index f92347d9d..487afa31a 100644 --- a/app/config.py +++ b/app/config.py @@ -1,3 +1,4 @@ +import json import os if os.environ.get('VCAP_APPLICATION'): @@ -78,6 +79,19 @@ class Config(object): NOTIFY_SERVICE_ID = 'd6aa2c68-a2d9-4437-ab19-3ae8eb202553' + NOTIFY_BILLING_DETAILS = json.loads( + os.environ.get('NOTIFY_BILLING_DETAILS') or 'null' + ) or { + 'account_number': '98765432', + 'sort_code': '01-23-45', + 'IBAN': 'GB33BUKB20201555555555', + 'swift': 'ABCDEF12', + 'notify_billing_email_addresses': [ + 'generic@digital.cabinet-office.gov.uk', + 'first.last@digital.cabinet-office.gov.uk', + ] + } + class Development(Config): NOTIFY_LOG_PATH = 'application.log' diff --git a/app/main/views/index.py b/app/main/views/index.py index 57d537796..f37a2b3c7 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -1,5 +1,6 @@ from flask import ( abort, + current_app, make_response, redirect, render_template, @@ -86,6 +87,7 @@ def billing_details(): if current_user.is_authenticated: return render_template( 'views/pricing/billing-details.html', + billing_details=current_app.config['NOTIFY_BILLING_DETAILS'], navigation_links=pricing_nav(), ) return render_template( diff --git a/app/templates/views/pricing/billing-details.html b/app/templates/views/pricing/billing-details.html index 9ee53b27c..e94216c63 100644 --- a/app/templates/views/pricing/billing-details.html +++ b/app/templates/views/pricing/billing-details.html @@ -39,12 +39,11 @@