Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

some settings cleaning and let TYP be configurable

  • Loading branch information...
commit 9eee0a7ffbd69d456cb3bb714c389caa20858d1d 1 parent b6cbb21
@andymckay andymckay authored
View
14 README.md
@@ -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
==========
View
2  inapp_pay_test/app_payments/views.py
@@ -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': {
View
1  inapp_pay_test/settings/base.py
@@ -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.
View
32 inapp_pay_test/settings/local.py-dist
@@ -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'),
@@ -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'
Please sign in to comment.
Something went wrong with that request. Please try again.