From c198ab89e1599cfe5feb12d3b6d8a0f9216ef86c Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Sat, 29 Mar 2014 23:30:38 -0400 Subject: [PATCH] Ask applicants for payment authorization after email confirmation Suggest $10, authorization expires after 30 days if we do nothing. This should smooth out the join process a bit. --- app/app.sig | 2 ++ app/app.sml | 7 +++++++ app/confirm.mlt | 29 ++++++++++++++++++++++++++--- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/app.sig b/app/app.sig index 2b7de99..07ed94c 100644 --- a/app/app.sig +++ b/app/app.sig @@ -20,4 +20,6 @@ sig val userExists : string -> bool val confirm : int * string -> bool + + val appUserName : int -> string end diff --git a/app/app.sml b/app/app.sml index 513fa94..f1a2c14 100644 --- a/app/app.sml +++ b/app/app.sml @@ -197,4 +197,11 @@ fun confirm (id, passwd) = | NONE => false end +fun appUserName id = + case C.oneOrNoRows (getDb ()) ($`SELECT name + FROM MemberApp + WHERE id = ^(C.intToSql id)`) of + SOME [name] => C.stringFromSql name + | NONE => raise Fail "Membership application not found" + end diff --git a/app/confirm.mlt b/app/confirm.mlt index 0cc9776..63e1a4a 100644 --- a/app/confirm.mlt +++ b/app/confirm.mlt @@ -4,11 +4,34 @@ val id = Web.stoi ($"id"); val passwd = $"p"; if App.confirm (id, passwd) then - %>

Confirmation successful

- You should hear from us within a few days from now.<% +%>

Confirmation successful

+

You should hear from us within a few days (usually at most 48 hours).

+ +

Authorize Us To Charge You With PayPal

+ +

If you'd like, you can authorize us to charge your initial dues +using Paypal now. This will place a hold on your Paypal account which +is automatically released after 30 days, and will be released +immediately if we reject your application for some reason. You can +also pay your initial dues after we have approved your application.

+ +

You are only required to send $10 for your initial balance, but you + may send as much as you'd like. You must either use a verified + Paypal account, or use a credit card with a confirmed address.

+ +
+ + + + + + +
+ +<% else %>

Error confirming

Did you already follow this confirmation link?<% end; -@footer[] %> \ No newline at end of file +@footer[] %> -- 2.20.1