Exemplo n.º 1
0
def accountDetails():
    outputWindow.show()
    account1 = Account(str(checkAccountBox.text()))
    opDict=account1.getAccountDetails()
    op=open('Account_Details.html').read()
    op=op.replace('idVal',opDict['AccountID'])
    op=op.replace('typeVal',opDict['Account Type'])
    op=op.replace('nameVal',opDict['Customer Name'])
    op=op.replace('balanceVal',opDict['Balance'])
    outputWindow.setHtml(op)
Exemplo n.º 2
0
import cgi, cgitb
import logging
from Account import Account

if (__name__ == '__main__'):
    cgitb.enable()
    frmLogin = cgi.FieldStorage()

    userName = str(frmLogin.getvalue('userId'))
    password = str(frmLogin.getvalue('password'))

    accountObj = Account()
    accountObj.logConfg()
    connectTodb = accountObj.connectToMysqlDb()
    accountDetail = accountObj.getAccountDetails(connectTodb, userName,
                                                 password)

    connectTodb.close()

    print("Content-Type: text/html")
    print()

    if accountDetail:
        #If row found then display Dashboard html page
        logging.info("User Logged in successfully")
        for accno, accnam, accbal in accountDetail:
            account_no = accno
            account_name = str(accnam, 'utf-8')
            account_balance = accbal
        print("""
         <html>
Exemplo n.º 3
0
"""
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',