From a5ad017c72dab600a636f2f429e57f05b48d4228 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sun, 18 Nov 2012 19:13:31 -0800 Subject: [PATCH 1/7] change spacing slightly --- trustify/client/payment_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trustify/client/payment_challenge.py b/trustify/client/payment_challenge.py index 46d9b811d..7c9a5fab1 100644 --- a/trustify/client/payment_challenge.py +++ b/trustify/client/payment_challenge.py @@ -35,7 +35,7 @@ class Payment_Challenge(Challenge): def get_display_string(self): if self.times_performed == 0: - return "You are buying " + self.formatted_reasons() + " You will need to visit " + self.url + " to submit your payment\nPlease press enter once your payment has been submitted" + return "You are buying " + self.formatted_reasons() + ".\nYou will need to visit\n " + self.url + "\nto submit your payment.\nPlease press Enter once your payment has been submitted." # The user has tried at least once... display a different message else: From c5f475c6fcbe89e91b180b1c8b43507aea995040 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sun, 18 Nov 2012 19:15:26 -0800 Subject: [PATCH 2/7] try to improve spacing again --- trustify/client/payment_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trustify/client/payment_challenge.py b/trustify/client/payment_challenge.py index 7c9a5fab1..84fd73e28 100644 --- a/trustify/client/payment_challenge.py +++ b/trustify/client/payment_challenge.py @@ -35,7 +35,7 @@ class Payment_Challenge(Challenge): def get_display_string(self): if self.times_performed == 0: - return "You are buying " + self.formatted_reasons() + ".\nYou will need to visit\n " + self.url + "\nto submit your payment.\nPlease press Enter once your payment has been submitted." + return "You are buying " + self.formatted_reasons() + "You will need to visit\n " + self.url + "\nto submit your payment.\nPlease press Enter once your payment has been submitted." # The user has tried at least once... display a different message else: From 5e3a03bd73116efcf1f238f8cff65249aa202c3f Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sun, 18 Nov 2012 19:31:23 -0800 Subject: [PATCH 3/7] make font monospaced for credit card number --- server-ca/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-ca/index.html b/server-ca/index.html index 2a1f7508f..4389d4477 100644 --- a/server-ca/index.html +++ b/server-ca/index.html @@ -39,8 +39,8 @@

Payment Form

-

-

:

+

+

From e66a8d54c368546085219e61f62c01b2a0258f28 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sun, 18 Nov 2012 19:36:49 -0800 Subject: [PATCH 4/7] make "thank you" page nicer too --- server-ca/payment.py | 3 ++- server-ca/thanks.html | 57 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 server-ca/thanks.html diff --git a/server-ca/payment.py b/server-ca/payment.py index fd13f95af..dd35cec6c 100755 --- a/server-ca/payment.py +++ b/server-ca/payment.py @@ -36,7 +36,8 @@ class payment(object): if r.hget(session, "state") != "payment": return "Attempt to process payment for session not expecting it." r.publish("payments", session) - return "

Thank you!

Processed a payment for session ID %s." % session + with open("thanks.html","r") as f: + return f.read() % session if __name__ == "__main__": app = web.application(urls, globals()) diff --git a/server-ca/thanks.html b/server-ca/thanks.html new file mode 100644 index 000000000..9109ff4ab --- /dev/null +++ b/server-ca/thanks.html @@ -0,0 +1,57 @@ + + + + + + Project Chocolate + + + + + + + + + + +
+
+

Thank you

+
+
+ +
+
+ +
+
+
+
+

Thanks for your payment!

+

+ You successfully processed a payment for session ID %s. +

+
+
+
+
+ + + +
+
+ + + + + + From 052644c2e445b23e0c4ee6c1be7eb4a603ad9273 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sun, 18 Nov 2012 19:44:38 -0800 Subject: [PATCH 5/7] surely the user will want to know how much money they paid :-) --- server-ca/thanks.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server-ca/thanks.html b/server-ca/thanks.html index 9109ff4ab..5a439e6e6 100644 --- a/server-ca/thanks.html +++ b/server-ca/thanks.html @@ -32,7 +32,8 @@

Thanks for your payment!

- You successfully processed a payment for session ID %s. + You successfully processed a credit card payment of 17.00 simoleons for the + issuance of a digital certificate.

This payment relates to session ID %s.

From b66e24ce2a81491040fb08d7fb41902f9e92eb47 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sun, 18 Nov 2012 19:49:12 -0800 Subject: [PATCH 6/7] say what names this request applied to --- server-ca/payment.py | 4 +++- server-ca/thanks.html | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server-ca/payment.py b/server-ca/payment.py index dd35cec6c..52ffa28a6 100755 --- a/server-ca/payment.py +++ b/server-ca/payment.py @@ -36,8 +36,10 @@ class payment(object): if r.hget(session, "state") != "payment": return "Attempt to process payment for session not expecting it." r.publish("payments", session) + names = r.lrange("%s:names" % session, 0, -1) + names_list = '
    ' + "\n".join("
  • %s
  • " % n for n in names) + '
' with open("thanks.html","r") as f: - return f.read() % session + return f.read() % (session, names) if __name__ == "__main__": app = web.application(urls, globals()) diff --git a/server-ca/thanks.html b/server-ca/thanks.html index 5a439e6e6..8ba30e48e 100644 --- a/server-ca/thanks.html +++ b/server-ca/thanks.html @@ -33,7 +33,10 @@

Thanks for your payment!

You successfully processed a credit card payment of 17.00 simoleons for the - issuance of a digital certificate.

This payment relates to session ID %s.

+ issuance of a digital certificate.

This payment relates to session ID %s, which + requested a certificate for the following names:

+

+ %s