Skip to content

Commit

Permalink
some settings cleaning and let TYP be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Mar 5, 2013
1 parent b6cbb21 commit 9eee0a7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 26 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ To use the JS shim hosted on a development install of the marketplace, set this:

INAPP_PAYMENTS_JS = 'http://localhost:8001/mozmarket.js'

For local use you might want to set the audience and type:

MOZ_INAPP_AUD = 'localhost'
MOZ_INAPP_TYP = 'mozilla-local/payments/pay/v1'

Create database
===============

Create a database and set this in the settings file. Out of the box, it should
just work with SQLLite:

python ./manage.py syncdb


Deployment
==========

Expand Down
2 changes: 1 addition & 1 deletion inapp_pay_test/app_payments/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def home(request):
pay_request = json.dumps({
'iss': settings.MOZ_APP_KEY,
'aud': settings.MOZ_INAPP_AUD,
'typ': 'mozilla/payments/pay/v1',
'typ': settings.MOZ_INAPP_TYP,
'exp': exp,
'iat': iat,
'request': {
Expand Down
1 change: 1 addition & 0 deletions inapp_pay_test/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
MOZ_APP_SECRET = '<from marketplace.mozilla.org>'
# The audience of the JWT.
MOZ_INAPP_AUD = 'firefox.marketplace.com'
MOZ_INAPP_TYP = 'mozilla/payments/pay/v1'

if STACKATO:
# Currently, Mozilla's Stackato only has a self-signed https cert.
Expand Down
32 changes: 7 additions & 25 deletions inapp_pay_test/settings/local.py-dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#from . import base
#INSTALLED_APPS = base.INSTALLED_APPS + ['debug_toolbar']

# Uncomment this and set to all slave DBs in use on the site.
# SLAVE_DATABASES = ['slave']

# Recipients of traceback emails and other notifications.
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
Expand All @@ -33,30 +30,15 @@ DEV = True
# Make this unique, and don't share it with anybody. It cannot be blank.
SECRET_KEY = ''

# Uncomment these to activate and customize Celery:
# CELERY_ALWAYS_EAGER = False # required to activate celeryd
# BROKER_HOST = 'localhost'
# BROKER_PORT = 5672
# BROKER_USER = 'playdoh'
# BROKER_PASSWORD = 'playdoh'
# BROKER_VHOST = 'playdoh'
# CELERY_RESULT_BACKEND = 'amqp'

## Log settings

# SYSLOG_TAG = "http_app_playdoh" # Make this unique to your project.
# LOGGING = dict(loggers=dict(playdoh={'level': logging.DEBUG}))

# Common Event Format logging parameters
#CEF_PRODUCT = 'Playdoh'
#CEF_VENDOR = 'Mozilla'


# After registering an app for in-app payments
# on https://marketplace.mozilla.org/
# fill these in from the Manage In-app Payments screen.
APPLICATION_KEY = '<from marketplace.mozilla.org>'
APPLICATION_SECRET = '<from marketplace.mozilla.org>'
MOZ_APP_KEY = '<from marketplace.mozilla.org>'
MOZ_APP_SECRET = '<from marketplace.mozilla.org>'

# To run against your local host, add something like this:
#INAPP_PAYMENTS_JS = 'http://localhost:8001/en-US/inapp-pay/mozmarket.js'
#INAPP_PAYMENTS_JS = 'http://localhost:8001/mozmarket.js'
#
# Set this to match your local server settings.
#MOZ_INAPP_AUD = 'localhost'
#MOZ_INAPP_TYP = 'mozilla-local/payments/pay/v1'

0 comments on commit 9eee0a7

Please sign in to comment.