Browse files

Fixeis

  • Loading branch information...
1 parent 23dda3d commit 74c6cf3776a671024b01924237ac1e207df8e472 @dustball dustball committed Apr 19, 2012
Showing with 12 additions and 5 deletions.
  1. +7 −2 main.py
  2. +2 −1 static/signin.js
  3. +3 −2 templates/main.html
View
9 main.py
@@ -384,10 +384,14 @@ def get(self):
code = ''
)
gateway = AimGateway(auth_net_login_id, auth_net_trans_key)
- gateway.use_test_mode = False
+ gateway.use_test_mode = True
gateway.use_test_url = False
- response = gateway.sale(10.00, card)
+ amount = float(int(random.random()*2000))/100
+ dollar_amount = '$%.2f' % amount
+ response = gateway.sale(amount, card)
self.response.out.write(simplejson.dumps({"trans_id":response.trans_id,
+ "amount": amount,
+ "dollar_amount": dollar_amount,
"status":response.status_strings[response.status],
"status_code": response.status,
"message": response.message}))
@@ -439,6 +443,7 @@ def main():
('/ministaff', MiniStaffHandler),
('/signin', SigninHandler),
('/staff', StaffHandler),
+ ('/api/charge', ChargeHandler),
('/sstats/?', StatHandler),
('/sstats/(.+)', StatsHandler),
('/log', LogHandler),
View
3 static/signin.js
@@ -46,9 +46,10 @@ function charge(cc,month,year) {
console.log(data);
if (data.status_code==1) {
$('#ajaxloading').fadeOut();
+ $('#ccamount').html(data.dollar_amount);
$('#ccthanksmessage').html(data.message+" #"+data.trans_id);
$('#ccthanks').fadeIn();
- setTimeout("$('#ccthanks').fadeOut();",3 * 1000);
+ setTimeout("$('#ccthanks').fadeOut();",6 * 1000);
} else {
$('#ccerrormessage').html(data.message);
$('#ajaxloading').hide();
View
5 templates/main.html
@@ -4,7 +4,7 @@
<title>Sign in</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="/static/md5.js"></script>
- <script type="text/javascript" src="/static/signin.js?v=3"></script>
+ <script type="text/javascript" src="/static/signin.js?v=5"></script>
<link rel="stylesheet" type="text/css" href="/static/signin.css" />
</head>
<body id="body">
@@ -136,7 +136,8 @@ <h3 style="margin:0">Cancel</h3>
<div id="ccthanks" class="corners" style="padding:2em; display:none; position:absolute; z-index:2; top:35%; left:29%; width:35%; border:2px solid #227b1b; background:#b5e5b2 ">
<img src="/static/check.png" height="130" width="130" align="left" style="margin-right:1em">
- <p style="text-align:center" id="thanksmessage">Thank You For Your $10 Donation</p>
+ <p style="text-align:center; font-size:180%" id="ccamount">&nbsp;</p>
+ <p style="text-align:center" >THANK YOU</p>
<p style="text-align:center; font-weight:normal; font-size:85%" id="ccthanksmessage">&nbsp;</p>
</div>

0 comments on commit 74c6cf3

Please sign in to comment.