Example #1
0
def lambda_handler(event, context):
   obp.setBaseUrl("https://citizensbank.openbankproject.com/")
   obp.setApiVersion("v4.0.0")

   # Login and set authorized token
   obp.login("michaelj","Infosys@123","a2kettx3t1hrnjeeswiptjgkkxy4prr4lo21wmrv")
   user = obp.getCurrentUser()
   print("Log stream name:", context.log_stream_name)
   print("Log group name:",  context.log_group_name)
   print("Request ID:",context.aws_request_id)
   print("invoked_function_arn ", context.invoked_function_arn )
   print("Event: ", event)
   print("Context: ", context)
   return dispatch(event)
# -*- coding: utf-8 -*-
from __future__ import print_function  # (at top of module)
import sys, requests
import lib.obp
import uuid
#import logging
#logging.basicConfig(level=logging.DEBUG)

# This test is calling in  V210 of OBP-API, Create Transaction Request for SANDBOX_TAN
# over Socgen1-k https://socgen-k-api.openbankproject.com/

#########################Step 1 :  Direct Login process .################
from props.socgen1_k_two_owners import *  #17

obp = lib.obp
obp.setBaseUrl(BASE_URL)
obp.setApiVersion(API_VERSION_V210)

print("Call API - 0 'DirectLogin' -- login and set authorized token")
obp.login(USERNAME, PASSWORD, CONSUMER_KEY)

########################### Step2 - Make a Payment - SANDBOX_TAN ################
print("")
print("Set fromAccount info: from_bank_id = {0} and from_account_id= {1}.".
      format(FROM_BANK_ID, FROM_ACCOUNT_ID))
from_bank_id = FROM_BANK_ID
from_account_id = FROM_ACCOUNT_ID

print("")
print("Set toAccount info: to_bank_id = {0} and to_account_id= {1}.".format(
    TO_BANK_ID, TO_ACCOUNT_ID))
Example #3
0
# -*- coding: utf-8 -*-

from __future__ import print_function  # (at top of module)
import sys, requests

# Note: in order to use this example, you need to have at least one account
# that you can send money from (i.e. be the owner).
# All properties are now kept in one central place

from props.default import *

# You probably don't need to change those
import lib.obp
obp = lib.obp

obp.setBaseUrl("https://accenture.openbankproject.com/")
obp.setApiVersion("v3.1.0")

# Login and set authorized token
obp.login('*****@*****.**', '9f5cc8',
          "5yi2eyaxltkqibfs3ghpojt1u3ay3jngnbzaoeiq")

obp.setCounterParty(COUNTERPARTY_BANK, OUR_COUNTERPARTY, OUR_COUNTERPARTY_ID,
                    OUR_COUNTERPARTY_IBAN)
obp.setPaymentDetails(OUR_CURRENCY, OUR_VALUE_LARGE)
banks = obp.getBanks()

our_bank = banks[0]['id']

cp_bank = obp.getCounterBankId()
cp_account = obp.getCounterpartyAccountId()