當前位置: 首頁>>代碼示例>>Python>>正文


Python OptimalApiClient.direct_debit_service_handler方法代碼示例

本文整理匯總了Python中PythonNetBanxSDK.OptimalApiClient.OptimalApiClient.direct_debit_service_handler方法的典型用法代碼示例。如果您正苦於以下問題:Python OptimalApiClient.direct_debit_service_handler方法的具體用法?Python OptimalApiClient.direct_debit_service_handler怎麽用?Python OptimalApiClient.direct_debit_service_handler使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PythonNetBanxSDK.OptimalApiClient.OptimalApiClient的用法示例。


在下文中一共展示了OptimalApiClient.direct_debit_service_handler方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: OptimalApiClient

# 需要導入模塊: from PythonNetBanxSDK.OptimalApiClient import OptimalApiClient [as 別名]
# 或者: from PythonNetBanxSDK.OptimalApiClient.OptimalApiClient import direct_debit_service_handler [as 別名]
#!/usr/bin/env python3
'''
Created on 1-June-2016

@author: Asawari.Vaidya
'''
from PythonNetBanxSDK.CustomerVault.EFTBankAccount import EFTBankAccount
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_EFT)
purchase_obj = Purchase(None)
purchase_obj.merchantRefNum(RandomTokenGenerator().generateToken())
purchase_obj.amount("10098")

eftbank_obj = EFTBankAccount(None)
eftbank_obj.paymentToken("Dw6TqO65OiBamTA")
purchase_obj.eft(eftbank_obj)

response_object = optimal_obj.direct_debit_service_handler().submit_purchase(purchase_obj)

print ("\nResponse Values ==========> ")
Utils.print_response(response_object)

開發者ID:OptimalPayments,項目名稱:Python_SDK,代碼行數:30,代碼來源:DirectDebitEFTpurchaseWithPaymentToken.py

示例2: EFTBankAccount

# 需要導入模塊: from PythonNetBanxSDK.OptimalApiClient import OptimalApiClient [as 別名]
# 或者: from PythonNetBanxSDK.OptimalApiClient.OptimalApiClient import direct_debit_service_handler [as 別名]
standalone_Obj.amount("10098")
standalone_Obj.customerIp("192.0.126.111")

eftbank_Obj = EFTBankAccount(None)
eftbank_Obj.accountHolderName("XYZ Company")
eftbank_Obj.accountNumber("335892")
eftbank_Obj.transitNumber("22446")
eftbank_Obj.institutionId("001")

profile_Obj = Profile(None)
profile_Obj.firstName("Joe")
profile_Obj.lastName("Smith")
profile_Obj.email("[email protected]")

billingdetails_Obj = BillingDetails(None)
billingdetails_Obj.street("100 Queen Street West")
billingdetails_Obj.city("Ottawa")
billingdetails_Obj.state("ON")
billingdetails_Obj.country("CA")
billingdetails_Obj.zip("90210")
billingdetails_Obj.phone("6139991100")

standalone_Obj.profile(profile_Obj)
standalone_Obj.billingDetails(billingdetails_Obj)
standalone_Obj.eft(eftbank_Obj)

response_object = optimal_obj.direct_debit_service_handler().submit_standalone(standalone_Obj)

print ("\nResponse Values ==========> ")
Utils.print_response(response_object)
開發者ID:OptimalPayments,項目名稱:Python_SDK,代碼行數:32,代碼來源:DirectDebitEFTStandaloneCreditpurchase.py


注:本文中的PythonNetBanxSDK.OptimalApiClient.OptimalApiClient.direct_debit_service_handler方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。