How to use the recurly.js.PRIVATE_KEY function in recurly

To help you get started, we’ve selected a few recurly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github recurly / recurly-client-python / tests / test_js.py View on Github external
def setUp(self):
        super(TestJs, self).setUp()
        recurly.js.PRIVATE_KEY = '0cc86846024a4c95a5dfd3111a532d13'
github lamby / django-recurly / django_recurly / models.py View on Github external
import recurly

from django.conf import settings

recurly.API_KEY = settings.RECURLY_API_KEY

if hasattr(settings, 'RECURLY_JS_PRIVATE_KEY'):
    recurly.js.PRIVATE_KEY = settings.RECURLY_JS_PRIVATE_KEY
github innocenceproject / collective.salesforce.fundraising / collective / salesforce / fundraising / recurly / views.py View on Github external
def generate_signature(self):
        # workaround for http://bugs.python.org/issue5285, map unicode to strings
        settings = get_settings()
        recurly.API_KEY = str(settings.recurly_api_key)
        recurly.js.PRIVATE_KEY = str(settings.recurly_private_key)
        plan_code = str(settings.recurly_plan_code)

        # Set a default currency for your API requests
        recurly.DEFAULT_CURRENCY = 'USD'

        return recurly.js.sign({'subscription': {'plan_code': plan_code}})