-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
29 lines (21 loc) · 922 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from dotenv import load_dotenv, find_dotenv
import os
from pecuniwrap.Pycuniator import Pycuniator
secrets_folder = 'secrets'
secrets_base_path= os.path.abspath(os.path.dirname(__file__)) + '/' + secrets_folder + '/'
load_dotenv(secrets_base_path + '/sandbox.env')
PT_HOST = os.getenv('PT_HOST')
PT_PORT = os.getenv('PT_PORT')
PT_PATH = os.getenv('PT_PATH')
PT_VERS = os.getenv('PT_VERS')
PT_TPPREDIRECTURI = os.getenv('PT_TPPREDIRECTURI')
PT_IBAN = os.getenv('PT_IBAN')
PT_WELLKNOWN = os.getenv('PT_WELLKNOWN')
CERT_PATH=secrets_base_path + os.getenv('CERT_PATH')
PRIV_KEY_PATH=secrets_base_path + os.getenv('PRIV_KEY_PATH')
TPP_CLIENT_ID = os.getenv('TPP_CLIENT_ID')
# To test config error
# PT_WELLKNOWN = None
cuniator = Pycuniator(PT_HOST,PT_PORT, PT_PATH,PT_VERS,PT_TPPREDIRECTURI,PT_IBAN,PT_WELLKNOWN, CERT_PATH, PRIV_KEY_PATH, TPP_CLIENT_ID)
# cuniator.test()
print(cuniator.get_Balance().accounts[0].iban)