Commit 9994abaf authored by ueshiba's avatar ueshiba
Browse files

Handle trial accounts when plan is not renewable

parent 22273c11
......@@ -285,7 +285,13 @@ class DefaultAccountProvider: AccountProvider, ConfigurationAccess, DatabaseAcce
return
}
guard info.isRenewable else {
callback?(nil, ClientError.renewingNonRenewable)
//We need to check if the plan is a trial even when the plan is not renewable, as the
//error message should be different for each scenario
if info.plan == .trial {
callback?(nil, ClientError.renewingTrial)
} else {
callback?(nil, ClientError.renewingNonRenewable)
}
return
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment