maidstone-hackspace/website/tools/list_registered_members.py

44 lines
1.0 KiB
Python

import os
import sys
sys.path.insert(0, os.path.abspath('../../'))
sys.path.append(os.path.abspath('../../'))
from website.config.settings import *
from website.libs.payments import payment, gocardless_provider, paypal_provider, braintree_provider
#list go cardless subscriptions
print('gocardless subscriptions')
gocardless = gocardless_provider()
gocardless.create_subscription(
amount=20.00,
name='test name',
redirect_success='http://localhost/',
redirect_failure='http://localhost/',
interval_unit='month',
interval_length='1')
for user in gocardless.fetch_subscriptions():
print(user)
print('braintree subscriptions')
braintree = braintree_provider()
print (braintree.create_subscription(
amount=20.00,
name='test name',
redirect_success='http://localhost/',
redirect_failure='http://localhost/',
interval_unit='month',
interval_length='1'))
for user in braintree.fetch_subscriptions():
print(user)
# paypal = paypal_provider()
# for user in paypal.fetch_subscriptions():
# print(user)