当前位置: 首页>>代码示例>>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;未经允许,请勿转载。