Ejemplo n.º 1
0
def add_store_credit(user, amount):
    client = Client(settings.SPREEDLY_AUTH_TOKEN_SECRET, settings.SPREEDLY_SITE_NAME)
    client.add_store_credit(user.id, amount)
    return get_subscription(user)
Ejemplo n.º 2
0
def add_store_credit(user, amount, site=DEFAULT_SITE_ALIAS):
    site=get_site(site)

    client = Client(site['SPREEDLY_AUTH_TOKEN_SECRET'], site['SPREEDLY_SITE_NAME'])
    client.add_store_credit(user.id, amount)
    return get_subscription(user, site['SPREEDLY_SITE_NAME'])