Skip to content

Commit

Permalink
Fix bug with renewing existing subscriptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
denny committed Jan 24, 2012
1 parent 7f08fbc commit 3e870c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ShinyCMS/Controller/PaymentHandler/Subscription/CCBill.pm
Expand Up @@ -101,9 +101,9 @@ sub success : Chained( 'base' ) : PathPart( 'success' ) : Args( 0 ) {
access => $access->id,
});

if ( $user_access ) {
if ( $user_access and $user_access->expires > $now ) {
# Extend the access period
my $expires = $user_access->expires || $now;
my $expires = $user_access->expires;
$expiry = $expires->add( days => $duration, hours => 1 );
$user_access->update({
expires => $expiry,
Expand Down

0 comments on commit 3e870c3

Please sign in to comment.