-
Notifications
You must be signed in to change notification settings - Fork 26
Can not prepare a transaction #14
Description
Hi!
Thank you for this usefull SDK!
I have a problem: when I try tou make a transaction, I have this error:
Traceback (most recent call last):
File "", line 1, in
File "/home/pierre2vaug/.local/lib/python3.8/site-packages/uphold/uphold.py", line 270, in prepare_txn
return data['id']
KeyError: 'id'
Then y try to modify a litlle bit the code in changing the prepare_txt() by:
def prepare_txn(self, card, to, amount, denom):
fields = {
'denomination[currency]': denom,
'denomination[amount]': str(amount),
'destination': to
}
data = self._post('/me/cards/' + card + '/transactions', fields)
print(data)
return data['id']
in idea of view what uphold send me. It prints: "{'code': 'unauthorized', 'message': 'Unauthorized'}".
Do you know how can I solve it?
Thanks!