update plaid authentication to match format of v1 success response.
This commit is contained in:
parent
5d35596c12
commit
9c9a397d83
@ -73,7 +73,7 @@ class Connection(AbstractConnectionClient):
|
||||
# response = client.link_token_create(request)
|
||||
# resp_dict = response.to_dict()
|
||||
# resp_dict['expiration'] = resp_dict['expiration'].strftime('%s')
|
||||
|
||||
|
||||
# self.credentials.update(resp_dict)
|
||||
# return self.credentials
|
||||
|
||||
@ -83,7 +83,7 @@ class Connection(AbstractConnectionClient):
|
||||
products=[Products("auth")],
|
||||
client_name="Qrtr Plaid",
|
||||
country_codes=[CountryCode('US')],
|
||||
#redirect_uri='https://domainname.com/oauth-page.html',
|
||||
# redirect_uri='https://domainname.com/oauth-page.html',
|
||||
language='en',
|
||||
webhook='https://webhook.example.com',
|
||||
user=LinkTokenCreateRequestUser(
|
||||
@ -93,7 +93,7 @@ class Connection(AbstractConnectionClient):
|
||||
response = self.client.link_token_create(request)
|
||||
resp_dict = response.to_dict()
|
||||
resp_dict['expiration'] = resp_dict['expiration'].strftime('%s')
|
||||
|
||||
|
||||
self.credentials.update(resp_dict)
|
||||
|
||||
def get_auth_token(self, public_token):
|
||||
@ -109,9 +109,9 @@ class Connection(AbstractConnectionClient):
|
||||
return format_error(e)
|
||||
access_token = exchange_response['access_token']
|
||||
item_id = exchange_response['item_id']
|
||||
self.credentials.update({"access_token":access_token, "item_id":item_id})
|
||||
return {"access_token":access_token, "item_id":item_id}
|
||||
|
||||
self.credentials.update({"access_token": access_token, "item_id": item_id})
|
||||
return {"access_token": access_token, "item_id": item_id}
|
||||
|
||||
def get_accounts(self, auth_token=None):
|
||||
if not auth_token:
|
||||
auth_token = self.credentials.get('access_token')
|
||||
@ -123,7 +123,7 @@ class Connection(AbstractConnectionClient):
|
||||
except Exception as e:
|
||||
print(e)
|
||||
accounts = None
|
||||
return accounts.get('accounts')
|
||||
return accounts
|
||||
|
||||
def get_transactions(
|
||||
self,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user