def ach(self, ach_bank_account): if isinstance(ach_bank_account, ACHBankAccount): p = ACHBankAccount(ach_bank_account.__dict__) self.__dict__['ach'] = p else: p = ACHBankAccount(ach_bank_account) self.__dict__['ach'] = p
def achBankAccounts(self, ach_bank_accounts): if isinstance(ach_bank_accounts, ACHBankAccount): p = ACHBankAccount(ach_bank_accounts) self.__dict__['achBankAccounts'] = p else: for count in range(0, ach_bank_accounts.__len__()): p = ACHBankAccount(ach_bank_accounts[count]) self.__dict__.setdefault('achBankAccounts', []).append(p)
address_obj.street2("Unit 201") address_obj.city("Toronto") address_obj.country("CA") address_obj.state("ON") address_obj.zip("M5H 2N2") address_obj.phone("647-788-3901") address_obj.recipientName("Jane Doe") profile_obj1 = Profile(None) profile_obj1.id(response_object.id) address_obj.profile(profile_obj1) response_object2 = optimal_obj.customer_vault_service_handler().create_address(address_obj) # Create ACH Bank Account achbankaccount_obj = ACHBankAccount(None) achbankaccount_obj.nickName("John's RBC Business Bank Account") achbankaccount_obj.accountNumber(RandomTokenGenerator().generateNumber()) achbankaccount_obj.routingNumber("123456789") achbankaccount_obj.accountHolderName("XYZ Business") achbankaccount_obj.billingAddressId(response_object2.id) achbankaccount_obj.accountType("CHECKING") profile_obj2 = Profile(None) profile_obj2.id(response_object.id) achbankaccount_obj.profile(profile_obj2) response_object3 = optimal_obj.customer_vault_service_handler().create_ach_bank_account(achbankaccount_obj) print ('\nProfile Id : ', response_object.id) print ('\nAddress Id : ', response_object2.id)
#!/usr/bin/env python3 ''' Created on 1-June-2016 @author: Asawari.Vaidya ''' from PythonNetBanxSDK.CustomerVault.ACHBankAccount import ACHBankAccount from PythonNetBanxSDK.DirectDebit.Purchase import Purchase from PythonNetBanxSDK.OptimalApiClient import OptimalApiClient from utils.Utils import Utils from Config import Config from RandomTokenGenerator import RandomTokenGenerator optimal_obj = OptimalApiClient(Config.api_key, Config.api_password, Config.environment, Config.account_number_ACH) purchase_obj = Purchase(None) purchase_obj.merchantRefNum(RandomTokenGenerator().generateToken()) purchase_obj.amount("10098") achbank_obj = ACHBankAccount(None) achbank_obj.payMethod("WEB") achbank_obj.paymentToken("DeZpXwrWtKIt8pN") purchase_obj.ach(achbank_obj) response_object = optimal_obj.direct_debit_service_handler().submit_purchase(purchase_obj) print ("\nResponse Values ==========> ") Utils.print_response(response_object)
from PythonNetBanxSDK.CustomerVault.Profile import Profile from PythonNetBanxSDK.DirectDebit.StandaloneCredits import StandaloneCredits from PythonNetBanxSDK.OptimalApiClient import OptimalApiClient from utils.Utils import Utils from Config import Config from RandomTokenGenerator import RandomTokenGenerator optimal_obj = OptimalApiClient(Config.api_key, Config.api_password, Config.environment, Config.account_number_ACH) standalone_Obj = StandaloneCredits(None) standalone_Obj.merchantRefNum(RandomTokenGenerator().generateToken()) standalone_Obj.amount("10098") standalone_Obj.customerIp("192.0.126.111") achbank_Obj = ACHBankAccount(None) achbank_Obj.accountHolderName("XYZ Company") achbank_Obj.accountType("CHECKING") achbank_Obj.accountNumber("988758392") achbank_Obj.routingNumber("211589828") achbank_Obj.payMethod("PPD") profile_Obj = Profile(None) profile_Obj.firstName("Joe") profile_Obj.lastName("Smith") profile_Obj.email("*****@*****.**") billingdetails_Obj = BillingDetails(None) billingdetails_Obj.street("100 Queen Street West") billingdetails_Obj.city("Los Angeles") billingdetails_Obj.state("CA")
#!/usr/bin/env python3 ''' Created on 1-June-2016 @author: Asawari.Vaidya ''' from PythonNetBanxSDK.CustomerVault.ACHBankAccount import ACHBankAccount from PythonNetBanxSDK.DirectDebit.Purchase import Purchase from PythonNetBanxSDK.OptimalApiClient import OptimalApiClient from utils.Utils import Utils from Config import Config from RandomTokenGenerator import RandomTokenGenerator optimal_obj = OptimalApiClient(Config.api_key, Config.api_password, Config.environment, Config.account_number_ACH) purchase_obj = Purchase(None) purchase_obj.merchantRefNum(RandomTokenGenerator().generateToken()) purchase_obj.amount("10098") achbank_obj = ACHBankAccount(None) achbank_obj.payMethod("WEB") achbank_obj.paymentToken("DeZpXwrWtKIt8pN") purchase_obj.ach(achbank_obj) response_object = optimal_obj.direct_debit_service_handler().submit_purchase( purchase_obj) print("\nResponse Values ==========> ") Utils.print_response(response_object)
from PythonNetBanxSDK.DirectDebit.Purchase import Purchase from PythonNetBanxSDK.OptimalApiClient import OptimalApiClient from utils.Utils import Utils from Config import Config from RandomTokenGenerator import RandomTokenGenerator optimal_obj = OptimalApiClient(Config.api_key, Config.api_password, Config.environment, Config.account_number_ACH) purchase_obj = Purchase(None) purchase_obj.merchantRefNum(RandomTokenGenerator().generateToken()) purchase_obj.amount("10098") purchase_obj.customerIp("192.0.126.111") achbank_obj = ACHBankAccount (None) achbank_obj.accountHolderName("XYZ Company") achbank_obj.accountType("CHECKING") #achbank_obj.accountNumber(RandomTokenGenerator().generateNumber()) achbank_obj.accountNumber("988948193") achbank_obj.routingNumber("211589828") achbank_obj.payMethod("WEB") profile_obj = Profile(None) profile_obj.firstName("Joe") profile_obj.lastName("Smith") profile_obj.email("*****@*****.**") billingdetails_obj = BillingDetails(None) billingdetails_obj.street("100 Queen Street West") billingdetails_obj.city("Los Angeles")