|
|
|
|
@ -231,7 +231,7 @@ sub do_register_stripe ( $c ) { |
|
|
|
|
push @{$c->stash->{errors}}, "Password is required" unless $password; |
|
|
|
|
push @{$c->stash->{errors}}, "Confirm Password is required" unless $p_confirm; |
|
|
|
|
|
|
|
|
|
return $c->redirect_error( 'show_register' ) |
|
|
|
|
return $c->redirect_error( 'show_register_stripe' ) |
|
|
|
|
if $c->stash->{errors}; |
|
|
|
|
|
|
|
|
|
push @{$c->stash->{errors}}, "Password and confirm password must match" |
|
|
|
|
@ -243,7 +243,7 @@ sub do_register_stripe ( $c ) { |
|
|
|
|
push @{$c->stash->{errors}}, "That email address is already registered." |
|
|
|
|
if $c->db->people( { email => $email } )->count; |
|
|
|
|
|
|
|
|
|
return $c->redirect_error( 'show_register_open' ) |
|
|
|
|
return $c->redirect_error( 'show_register_stripe' ) |
|
|
|
|
if $c->stash->{errors}; |
|
|
|
|
|
|
|
|
|
my $person = try { |
|
|
|
|
@ -267,12 +267,12 @@ sub do_register_stripe ( $c ) { |
|
|
|
|
push @{$c->stash->{errors}}, "Account could not be created: $_"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return $c->redirect_error( 'show_register_open' ) |
|
|
|
|
return $c->redirect_error( 'show_register_stripe' ) |
|
|
|
|
if $c->stash->{errors}; |
|
|
|
|
|
|
|
|
|
# Log the user in and send them to the dashboard. |
|
|
|
|
# Log the user in asnd then send themn to the payment page. |
|
|
|
|
$c->session->{uid} = $person->id; |
|
|
|
|
$c->redirect_to( $c->url_for( 'show_register_stripe_pay' ) ); |
|
|
|
|
$c->redirect_to( $c->url_for( 'show_dashboard' ) ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#== |
|
|
|
|
|