File tree Expand file tree Collapse file tree
client/directives/modals/settingsModal/forms/billingForm/changePaymentForm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,11 +6,13 @@ require('app')
66function ChangePaymentFormController (
77 $rootScope ,
88 currentOrg ,
9+ errs ,
910 fetchPaymentMethod ,
11+ fetchPlan ,
12+ fetchWhitelists ,
1013 loading ,
1114 savePaymentMethod ,
12- stripe ,
13- fetchPlan
15+ stripe
1416) {
1517 var CPFC = this ;
1618 CPFC . currentOrg = currentOrg ;
@@ -44,6 +46,9 @@ function ChangePaymentFormController(
4446 . then ( function ( res ) {
4547 return savePaymentMethod ( res . id ) ;
4648 } )
49+ . then ( function ( ) {
50+ return fetchWhitelists ( ) ;
51+ } )
4752 . then ( function ( ) {
4853 // Not doing an angular timeout because we don't care about the digest.
4954 // We want to wait for this form to no longer be visible before we clear it and cause error outlines to show.
@@ -60,6 +65,9 @@ function ChangePaymentFormController(
6065 } else {
6166 CPFC . error = messageConversion [ err . type ] ;
6267 }
68+ if ( ! CPFC . error ) {
69+ errs . handler ( err ) ;
70+ }
6371 } )
6472 . finally ( function ( ) {
6573 loading ( 'savePayment' , false ) ;
You can’t perform that action at this time.
0 commit comments