Ejemplo n.º 1
0
# Include the Dwolla REST Client
from dwolla import DwollaClientApp

# Include any required keys
import _keys

# Instantiate a new Dwolla User client
# And, Seed a previously generated access token
Dwolla = DwollaClientApp(_keys.apiKey, _keys.apiSecret)

'''
    EXAMPLE 1: 
      Register a new Dwolla user
'''
user = Dwolla.register_user(email="*****@*****.**", password="******", firstName="Michael", lastName="Schonfeld", address="902 Broadway St.", address2="Floor 4", city="New York", state="NY", zip=10010, dateOfBirth="01/01/1960", phone="5551231234", pin="1234")
print(user)
Ejemplo n.º 2
0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from .settings import set_dwolla_env
set_dwolla_env()

from django.conf import settings
from dwolla import DwollaClientApp, DwollaGateway

if settings.DWOLLA_SANDBOX:
    KEY = 'sandbox'
    DWOLLA_ADMIN_ID = settings.DWOLLA_ACCOUNTS[KEY]['user_id']
    DWOLLA_ADMIN_APP = None
else:
    KEY = 'production'
    DWOLLA_ADMIN_ACCOUNT = settings.DWOLLA_ACCOUNTS['admin']
    DWOLLA_ADMIN_ID = DWOLLA_ADMIN_ACCOUNT['user_id']
    DWOLLA_ADMIN_APP = DwollaClientApp(DWOLLA_ADMIN_ACCOUNT['key'],
                                       DWOLLA_ADMIN_ACCOUNT['secret'])

DWOLLA_ACCOUNT = settings.DWOLLA_ACCOUNTS[KEY]
DWOLLA_APP = DwollaClientApp(DWOLLA_ACCOUNT['key'], DWOLLA_ACCOUNT['secret'])
if DWOLLA_ADMIN_APP is None:
    DWOLLA_ADMIN_APP = DWOLLA_APP
DWOLLA_GATE = DwollaGateway(DWOLLA_ACCOUNT['key'], DWOLLA_ACCOUNT['secret'])