witten
/
luminotes
Archived
1
0
Fork 0

Free trials don't send any transaction info to /users/thanks, so changed the code not to expect it.

This commit is contained in:
Dan Helfman 2008-12-31 00:19:27 -08:00
parent 5a5331d0de
commit bbe9d17940
2 changed files with 10 additions and 7 deletions

View File

@ -1598,15 +1598,18 @@ class Users( object ):
# if there's no rate plan or we've retried too many times, give up and display an error
RETRY_TIMEOUT = 15
if rate_plan is None or retry_count > RETRY_TIMEOUT:
if retry_count > RETRY_TIMEOUT:
note = Thanks_error_note()
# if the rate plan of the subscription matches the user's current rate plan, success
elif rate_plan == result[ u"user" ].rate_plan:
note = Thanks_note( self.__rate_plans[ rate_plan ][ u"name" ].capitalize() )
result[ "conversion" ] = "subscribe_%s" % rate_plan
# otherwise, display an auto-reloading "processing..." page
else:
# if a rate plan is given, display an auto-reloading "processing..." page
elif rate_plan is not None:
note = Processing_note( rate_plan, retry_count )
# otherwise, assume that this is a free trial and default to a generic thanks page
else:
note = Thanks_note()
result[ "notebook" ] = main_notebook
result[ "startup_notes" ] = self.__database.select_many( Note, main_notebook.sql_load_startup_notes() )

View File

@ -2,7 +2,7 @@ from Tags import Span, H3, P, A
class Thanks_note( Span ):
def __init__( self, rate_plan_name ):
def __init__( self, rate_plan_name = None ):
Span.__init__(
self,
H3( u"thank you" ),
@ -13,9 +13,9 @@ class Thanks_note( Span ):
),
P(
u"""
You are now subscribed to Luminotes %s. Please click on one of your
notebooks to the right to get started with your newly upgraded wiki.
""" % rate_plan_name,
You are now subscribed to Luminotes%s. Please click on one of your
notebooks to the left to get started with your newly upgraded wiki.
""" % ( rate_plan_name and u" %s" % rate_plan_name or u"" ),
),
P(
u"""