Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Stubbed out the receipt for payment_for_open_source
Browse files Browse the repository at this point in the history
  • Loading branch information
kaguillera committed Sep 8, 2017
1 parent 28f44aa commit a7050f6
Showing 1 changed file with 120 additions and 0 deletions.
120 changes: 120 additions & 0 deletions www/browse/payments/%uuid.html.spt
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>&nbsp;</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">&mdash;</td>
<td class="txnid">Transaction ID: {{ pfos.transaction_id }}</td>
</tr>
</table>

</div></div>

0 comments on commit a7050f6

Please sign in to comment.