Skip to content

Commit

Permalink
Change JWT for price tiers
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar303 committed Jun 25, 2012
1 parent 5abf0db commit fcb876c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions inapp_pay_test/app_payments/models.py
Expand Up @@ -32,8 +32,7 @@ class Meta:
class Transaction(ModelBase):
moz_transaction_id = models.IntegerField(blank=True, null=True)
product = models.CharField(max_length=100)
currency = models.CharField(max_length=3)
price = models.DecimalField(max_digits=9, decimal_places=2)
price_tier = models.IntegerField()
description = models.CharField(max_length=255, blank=True)
state = models.IntegerField(choices=TRANS_STATE_CHOICES.items())

Expand Down
6 changes: 2 additions & 4 deletions inapp_pay_test/app_payments/views.py
Expand Up @@ -25,8 +25,7 @@ def home(request):
'exp': exp,
'iat': iat,
'request': {
'price': '0.99',
'currency': 'USD',
'priceTier': 1,
'name': 'The Product',
'description': 'detailed description',
'productdata': '<set to local transaction ID>'
Expand Down Expand Up @@ -63,8 +62,7 @@ def sign_request(request):
trans = Transaction.objects.create(
state=TRANS_PENDING,
product=pay_request['request']['name'],
price=pay_request['request']['price'],
currency=pay_request['request']['currency'],
price_tier=pay_request['request']['priceTier'],
description=pay_request['request']['description'])
tx = 'transaction_id=%s' % trans.pk
pay_request['request']['productdata'] = tx
Expand Down

0 comments on commit fcb876c

Please sign in to comment.