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

Commit

Permalink
add in solitude oauth (bug 858813)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Apr 16, 2013
1 parent 6fd7c73 commit 6bef651
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/solitude/api.py
Expand Up @@ -279,7 +279,9 @@ def get_transaction(self, uuid):
return transaction


if getattr(settings, 'SOLITUDE_URL', False):
client = SolitudeAPI(settings.SOLITUDE_URL)
else:
client = SolitudeAPI('http://example.com')
if not settings.SOLITUDE_URL:
raise ValueError('SOLITUDE_URL is required')

client = SolitudeAPI(settings.SOLITUDE_URL)
client.slumber.activate_oauth(settings.SOLITUDE_OAUTH.get('key'),
settings.SOLITUDE_OAUTH.get('secret'))
3 changes: 3 additions & 0 deletions webpay/settings/base.py
Expand Up @@ -223,6 +223,9 @@
# server for it.
SOLITUDE_URL = None

# The OAuth tokens for solitude.
SOLITUDE_OAUTH = {'key': '', 'secret': ''}

# Instead of doing a real Bango pay flow, redirect to a fake placeholder
# for the Bango flow when True.
FAKE_PAYMENTS = False
Expand Down
2 changes: 2 additions & 0 deletions webpay/settings/sites/dev/settings_base.py
Expand Up @@ -99,5 +99,7 @@
SECRET = private.SECRET

SOLITUDE_URL = 'https://payments-dev.allizom.org'
SOLITUDE_OAUTH = {'key': private.SOLITUDE_AUTH_KEY,
'secret': private.SOLITUDE_OAUTH_SECRET}

SENTRY_DSN = private.SENTRY_DSN

0 comments on commit 6bef651

Please sign in to comment.