-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenBankApi.py
40 lines (26 loc) · 1000 Bytes
/
OpenBankApi.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
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 19 01:29:08 2020
@author: Mahesh
"""
import json
from Account import Account
from AML import AML
def validate(paymentDetails):
account = Account(paymentDetails['BeneficiaryAcc'])
aml = AML(account.getAccountDetailsAML(paymentDetails['Amount'], paymentDetails['Currency']))
return aml.validateAml();
account1 = Account('50000012345601') # Amarjeet
print(account1.getAccountDetails())
print(account1.getTransactions())
account2 = Account('50000012345602') # Abhishek
print(account2.getAccountDetails())
print(account2.getTransactions())
inputJson1 = {'PayeeAccount': '50000012345602','BeneficiaryAcc': '50000012345601',
'Currency': 'GBP',
'Amount': '100'}
inputJson2 = {'PayeeAccount': '50000012345601','BeneficiaryAcc': '50000012345602',
'Currency': 'GBP',
'Amount': '100'}
print(OpenBankApi.validate(inputJson1))
print(OpenBankApi.validate(inputJson2))