@@ -17,13 +17,6 @@ class IndexView(AgencySessionRequiredMixin, IndexContextMixin, FormView):
1717 """View for the enrollment landing page."""
1818
1919 enrollment_method = models .EnrollmentMethods .SELF_SERVICE
20- form_class = forms .CardTokenizeSuccessForm
21- route_enrollment_success = routes .ENROLLMENT_SUCCESS
22- route_reenrollment_error = routes .ENROLLMENT_REENROLLMENT_ERROR
23- route_retry = routes .ENROLLMENT_RETRY
24- route_system_error = routes .ENROLLMENT_SYSTEM_ERROR
25- route_server_error = routes .SERVER_ERROR
26- route_tokenize_success = routes .ENROLLMENT_INIT_INDEX
2720 template_name = "enrollment_init/index.html"
2821
2922 def get_context_data (self , ** kwargs ):
@@ -34,8 +27,9 @@ def get_context_data(self, **kwargs):
3427 "headline" : _ ("You are eligible for a reduced fare!" ),
3528 "next_step" : _ ("The last step is to register a bank card so you get a reduced fare when you tap." ),
3629 "collect_js_api_key" : self .agency .init_config .tokenization_api_key ,
37- "cta_button" : "./tokenize" ,
30+ "cta_button" : routes . ENROLLMENT_INIT_START ,
3831 "enrollment_method" : self .enrollment_method ,
32+ "flow" : self .flow ,
3933 "transit_processor" : {
4034 "name" : "INIT" ,
4135 "website" : "https://www.initse.com/enus/solutions/fare-collection-revenue-management/" ,
@@ -45,7 +39,7 @@ def get_context_data(self, **kwargs):
4539 return context
4640
4741
48- class TokenizeView (AgencySessionRequiredMixin , IndexContextMixin , FormView ):
42+ class StartView (AgencySessionRequiredMixin , IndexContextMixin , FormView ):
4943 """View for the page that tokenizes the user card."""
5044
5145 enrollment_method = models .EnrollmentMethods .SELF_SERVICE
@@ -55,8 +49,8 @@ class TokenizeView(AgencySessionRequiredMixin, IndexContextMixin, FormView):
5549 route_retry = routes .ENROLLMENT_RETRY
5650 route_system_error = routes .ENROLLMENT_SYSTEM_ERROR
5751 route_server_error = routes .SERVER_ERROR
58- route_tokenize_success = routes .ENROLLMENT_INIT_INDEX
59- template_name = "enrollment_init/tokenize .html"
52+ route_tokenize_success = routes .ENROLLMENT_INIT_SUCCESS
53+ template_name = "enrollment_init/start .html"
6054
6155 def get_context_data (self , ** kwargs ):
6256 context = super ().get_context_data (** kwargs )
@@ -67,13 +61,14 @@ def get_context_data(self, **kwargs):
6761 tokenize_success_form = forms .CardTokenizeSuccessForm (
6862 action_url = self .route_tokenize_success , auto_id = True , label_suffix = ""
6963 )
64+
7065 context .update (
7166 {
7267 "collect_js_api_key" : self .agency .init_config .tokenization_api_key ,
7368 "forms" : [tokenize_system_error_form , tokenize_success_form ],
7469 "form_success" : tokenize_success_form .id ,
7570 "form_system_error" : tokenize_system_error_form .id ,
76- "cta_button " : "./tokenize" ,
71+ "success_url " : self . route_tokenize_success ,
7772 "enrollment_method" : self .enrollment_method ,
7873 "transit_processor" : {
7974 "name" : "INIT" ,
0 commit comments