General code cleanup
This commit is contained in:
parent
b96c0db896
commit
1ba84f8e24
@ -21,8 +21,6 @@ def format_error(e):
|
||||
class Connection(AbstractConnectionClient):
|
||||
|
||||
def __init__(self, credentials):
|
||||
print("Plaid Connection Creation Initiated")
|
||||
print(credentials)
|
||||
self.credentials = credentials.dict()
|
||||
|
||||
# Fill in your Plaid API keys -
|
||||
@ -53,16 +51,6 @@ class Connection(AbstractConnectionClient):
|
||||
)
|
||||
api_client = plaid.ApiClient(configuration)
|
||||
self.client = plaid_api.PlaidApi(api_client)
|
||||
|
||||
# self.client = plaid.Client(
|
||||
# client_id=self.PLAID_CLIENT_ID,
|
||||
# secret=self.PLAID_SECRET,
|
||||
# environment=self.PLAID_ENV,
|
||||
# public_key=self.PLAID_PUBLIC_KEY,
|
||||
# # api_version='2019-05-29',
|
||||
# api_version='2020-09-14',
|
||||
# #webhook='https://qrtr-services.herokuapp.com/connection/plaid-webhook/'
|
||||
# )
|
||||
public_key = self.credentials.get('public_token')
|
||||
auth_token = self.credentials.get('auth_token')
|
||||
if not auth_token and public_key:
|
||||
|
||||
@ -66,7 +66,6 @@ class ConnectionViewSet(viewsets.ModelViewSet):
|
||||
plaid_conn = importlib.import_module(f"connection.connections.plaid_client")
|
||||
conn_type = ConnectionType.objects.get(name="Plaid")
|
||||
try:
|
||||
print(f"CREATING CONNECTION, {request.data}")
|
||||
plaid_client = plaid_conn.Connection(request.data)
|
||||
except ValueError:
|
||||
return Response(status=status.HTTP_503,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user