This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stubbed out the receipt for payment_for_open_source
- Loading branch information
1 parent
28f44aa
commit a7050f6
Showing
1 changed file
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
from aspen import Response | ||
from gratipay.models.payment_for_open_source import PaymentForOpenSource | ||
|
||
[-------------------] | ||
|
||
try: | ||
uuid = request.path['uuid'] | ||
except ValueError: | ||
raise Response(400) | ||
|
||
# pfos - payment_for_open_source | ||
pfos = PaymentForOpenSource.from_uuid(uuid) | ||
|
||
if pfos is None: | ||
raise Response(404) | ||
|
||
|
||
[-------------------] | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
background: #EEE; | ||
} | ||
body, table { | ||
font: normal 12pt/14pt 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif; | ||
} | ||
#page { | ||
width: 3in; | ||
border: 1px solid black; | ||
background: white; | ||
margin: 1pc auto; | ||
} | ||
#page-padding { | ||
padding: 0.25in; | ||
} | ||
h1 { | ||
margin: 0; | ||
padding: 1.5em 0 0.5em; | ||
} | ||
table { | ||
margin: 1em 0; | ||
} | ||
th, td { | ||
vertical-align: top; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
th { | ||
text-align: left; | ||
padding-right: 1em; | ||
} | ||
td { | ||
text-align: right; | ||
} | ||
.total { | ||
font-size: 14pt; | ||
} | ||
#txnid { | ||
border-top: 1px solid black; | ||
margin: 0; | ||
padding: 0; | ||
font-size: 8.5pt; | ||
line-height: 8.5pt; | ||
text-transform: uppercase; | ||
width: 100%; | ||
} | ||
#txnid td { | ||
padding: 3pt 0 0; | ||
white-space: nowrap; | ||
} | ||
#txnid td.date { text-align: left; } | ||
#txnid td.mdash { text-align: center; width: 100%; } | ||
#txnid td.txnid { text-align: right; } | ||
</style> | ||
<div id="page"><div id="page-padding"> | ||
|
||
<div> | ||
Gratipay, LLC<br /> | ||
716 Park Road<br /> | ||
Ambridge, PA 15003<br /> | ||
</div> | ||
|
||
<h1>Receipt</h1> | ||
|
||
<div id="their-info"> | ||
{{ pfos.name }} | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
</div> | ||
|
||
<table> | ||
<tr> | ||
<th>Amount:</th> | ||
<td>$</td> | ||
<td>{{ pfos.amount }}</td> | ||
</tr> | ||
<tr> | ||
<th>Tax:</th> | ||
<td>$</td> | ||
<td> </td> | ||
</tr> | ||
<tr class="total"> | ||
<th>Total:</th> | ||
<td>$</td> | ||
<td>{{ pfos.amount }}</td> | ||
</tr> | ||
</table> | ||
|
||
<table id="txnid"> | ||
<tr> | ||
<td class="date">{{ pfos.ctime.strftime("%B %d, %Y").replace(' 0', ' ') }}</td> | ||
<td class="mdash">—</td> | ||
<td class="txnid">Transaction ID: {{ pfos.transaction_id }}</td> | ||
</tr> | ||
</table> | ||
|
||
</div></div> |