|
|
|
|
@ -272,6 +272,21 @@ sub do_register_stripe ( $c ) { |
|
|
|
|
|
|
|
|
|
# Log the user in and send them to the dashboard. |
|
|
|
|
$c->session->{uid} = $person->id; |
|
|
|
|
$c->redirect_to( $c->url_for( 'show_register_stripe_pay' ) ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#== |
|
|
|
|
# GET /register/stripe/pay | show_register_stripe_pay | N/A |
|
|
|
|
# |
|
|
|
|
# Once a user has registered in the strip work flow, they will need to pay |
|
|
|
|
# for their account before it is enabled. This route will bring them to the |
|
|
|
|
# stripe subscription payment page. |
|
|
|
|
#== |
|
|
|
|
sub register_stripe_pay ( $c ) { |
|
|
|
|
# Don't allow this user registration method unless register.enable_open is true. |
|
|
|
|
return $c->redirect_to( $c->url_for( 'show_register' ) ) |
|
|
|
|
unless $c->config->{register}{enable_stripe}; |
|
|
|
|
|
|
|
|
|
$c->redirect_to( |
|
|
|
|
$c->ua->get( $c->config->{stripe}->{backend} . '/stripe/get-checkout-link?lookup_key=' . $c->config->{stripe}->{lookup_key} )->result->json->{url} |
|
|
|
|
); |
|
|
|
|
|