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

Commit

Permalink
inapp cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
potch committed May 17, 2012
1 parent 2edbc9b commit bc55871
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions media/js/mkt/inapp_payments.js
Expand Up @@ -22,6 +22,9 @@ var preauth_window;
if (win_top.opener) {
win_top = win_top.opener;
}
$('.purchase').click(function(e) {
$(this).addClass('purchasing').html($(this).data('purchasing-label'));
});
$('#setup-preauth').click(function(e) {
e.preventDefault();
if (preauth_window) {
Expand Down
8 changes: 4 additions & 4 deletions mkt/inapp_pay/templates/inapp_pay/complete.html
Expand Up @@ -8,12 +8,12 @@
</header>
<div>
<div class="product-details">
<div class="icon">
<img src="{{ img }}">
</div>
<h2>{{ item }}</h2>
<p>{{ description }}</p>
<p>{{ _('Purchased successfully') }}</p>
</div>
<div class="actions">
<button href="#" class="button disabled">{{ _('purchased') }}</button>
</div>
</div>
<footer>
<button class="button close">{{ loc('Close window') }}</button>
Expand Down
5 changes: 4 additions & 1 deletion mkt/inapp_pay/templates/inapp_pay/pay_start.html
Expand Up @@ -17,7 +17,10 @@ <h2>{{ item }}</h2>
<form method="post" action="{{ url('inapp_pay.pay') }}">
{{ csrf() }}
<input type="hidden" name="req" value="{{ signed_request }}">
<button href="#" class="button purchase">{{ currency }} {{ price }}</button>
<button href="#" class="button purchase"
data-purchasing-label="{{ _('Purchasing&hellip;') }}">

This comment has been minimized.

Copy link
@cvan

cvan May 17, 2012

Contributor

you're not using data-purchasing-label yet?

This comment has been minimized.

Copy link
@potch

potch May 17, 2012

Author Contributor

um, yes I am? bc55871#L0R26

This comment has been minimized.

Copy link
@cvan

cvan May 17, 2012

Contributor

hehe, I'm blind

{{ currency }} {{ price }}
</button>
</form>
</footer>
{% endblock %}
5 changes: 4 additions & 1 deletion mkt/inapp_pay/views.py
Expand Up @@ -153,10 +153,13 @@ def pay(request, signed_req, pay_req):
# Payment was completed using pre-auth. Woo!
_payment_done(request, payment)

cfg = pay_req['_config']

c = dict(price=pay_req['request']['price'],
product=pay_req['_config'].addon,
product=cfg.addon,
currency=pay_req['request']['currency'],
item=pay_req['request']['name'],
img=cfg.image_url(pay_req['request'].get('imageURL')),
description=pay_req['request']['description'],
signed_request=signed_req)
return jingo.render(request, 'inapp_pay/complete.html', c)
Expand Down

0 comments on commit bc55871

Please sign in to comment.