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


Python OptimalApiClient.customer_vault_service_handler方法代碼示例

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


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

示例1: OptimalApiClient

# 需要導入模塊: from PythonNetBanxSDK.OptimalApiClient import OptimalApiClient [as 別名]
# 或者: from PythonNetBanxSDK.OptimalApiClient.OptimalApiClient import customer_vault_service_handler [as 別名]
form = cgi.FieldStorage()
profile_id = form.getvalue('profileId')
card_num = form.getvalue('cardNumber')

optimal_obj = OptimalApiClient(Config.api_key, Config.api_password, Config.environment, Config.account_number)

card_obj = Card(None)
card_obj.nickName("John's corporate Visa")
card_obj.holderName("MR. JOHN SMITH")
card_obj.cardNum(card_num)
#card_obj.cardNum("4510150000000321")
card_obj.defaultCardIndicator("true")
card_exp_obj = CardExpiry(None)
card_exp_obj.month("12")
card_exp_obj.year("2019")
profile_obj = Profile(None)
profile_obj.id(profile_id)
#profile_obj.id("e17871ed-5430-4234-a6fb-f3c9ccf995cf")
card_obj.profile(profile_obj)
card_obj.cardExpiry(card_exp_obj)

response_object = optimal_obj.customer_vault_service_handler().create_card(card_obj)

print ('Content-Type: text/html')
print ()
print ('<html>')
print ('<head><title>Customer Vault - Create Customer Card</title></head>')
print ('<body>')
print (response_object.__dict__)
print ('</body></html>')
開發者ID:EDUlib,項目名稱:Python_SDK-1,代碼行數:32,代碼來源:CreateCard.py

示例2: OptimalApiClient

# 需要導入模塊: from PythonNetBanxSDK.OptimalApiClient import OptimalApiClient [as 別名]
# 或者: from PythonNetBanxSDK.OptimalApiClient.OptimalApiClient import customer_vault_service_handler [as 別名]
from Config import Config
from RandomTokenGenerator import RandomTokenGenerator


optimal_obj = OptimalApiClient(Config.api_key, Config.api_password, Config.environment, Config.account_number)

# Create Customer Profile
profile_obj = Profile(None)
profile_obj.merchantCustomerId(RandomTokenGenerator().generateToken())
profile_obj.locale("en_US")
profile_obj.firstName("John")
profile_obj.lastName("Smith")
profile_obj.email("[email protected]")
profile_obj.phone("713-444-5555")
        
response_object = optimal_obj.customer_vault_service_handler().create_profile(profile_obj)

# Create Address
address_obj = Address(None)
address_obj.nickName("home")
address_obj.street("100 Queen Street West")
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)
開發者ID:OptimalPayments,項目名稱:Python_SDK,代碼行數:33,代碼來源:CustomerVaultEFTBank.py


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