@ -254,9 +254,12 @@ sub do_register_stripe ( $c ) {
});
$person->new_related('auth_password', {})->set_password($c->param('password'));
# Create the subscription.
$person->subscription->insert;
# Notify the system about the new account.
$c->db->system_notes->create({
source => 'User Registration (Open)',
source => 'User Registration (Stripe)',
content => 'An account was created for ' . $person->email,
@ -132,10 +132,9 @@ sub subscription ($c) {
# Store the customer id along side the user in the DB.
if ( $customer_id ) {
$c->db->storage->schema->txn_do( sub {
$c->stash->{person}->stripe_customer_id( $customer_id );
$c->stash->{person}->is_subscribed( 1 );
$c->stash->{person}->is_enabled( 1 );
$c->stash->{person}->update;
$c->stash->{person}->subscription->stripe_customer_id( $customer_id );
$c->stash->{person}->subscription->is_valid( 1 );
$c->stash->{person}->subscription->update;
}