Created
July 13, 2016 13:20
-
-
Save beweinreich/d66ffe982ce6f8e700d5db823f0e0d15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from plaid import Client | |
from plaid import errors as plaid_errors | |
# import DRF, env vars, etc. | |
Client.config({'url': settings.PLAID_CONFIG_URL}) | |
plaid_client = Client(client_id=settings.PLAID_CLIENT_ID, secret=settings.PLAID_SECRET) | |
public_token = "test,chase,connected" | |
account_id = "someaccountid" | |
try: | |
response = plaid_client.exchange_token(public_token, account_id) | |
except plaid_errors.UnauthorizedError: | |
raise serializers.ValidationError("Unauthorized Plaid Connection") | |
stripe_token = response.json()['stripe_bank_account_token'] # this is not showing up? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment