Skip to content

Instantly share code, notes, and snippets.

@antoviaque
Created January 21, 2013 10:04
Show Gist options
  • Save antoviaque/4585001 to your computer and use it in GitHub Desktop.
Save antoviaque/4585001 to your computer and use it in GitHub Desktop.
www-data@cardstories2:~/cardstories$ ./website/manage.py shell
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import json
>>> from django.conf import settings
>>> from decimal import Decimal
>>> from cardstories.models import grant_user_bought_cards
>>> class ipn_obj:
... business = settings.PAYPAL_RECEIVER_EMAIL
... payment_status = 'Completed'
... mc_gross = Decimal(settings.CS_EXTRA_CARD_PACK_PRICE)
... mc_currency = settings.CS_EXTRA_CARD_PACK_CURRENCY
... custom = json.dumps({'player_id':4864})
...
>>> grant_user_bought_cards(ipn_obj())
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment