当前位置: 首页>>代码示例>>Python>>正文


Python HpsCardHolder.address方法代码示例

本文整理汇总了Python中securesubmit.entities.credit.HpsCardHolder.address方法的典型用法代码示例。如果您正苦于以下问题:Python HpsCardHolder.address方法的具体用法?Python HpsCardHolder.address怎么用?Python HpsCardHolder.address使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在securesubmit.entities.credit.HpsCardHolder的用法示例。


在下文中一共展示了HpsCardHolder.address方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_012_charge_discover

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_012_charge_discover(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860'
        card_holder.address.zip = '750241234'

        direct_market_data = HpsDirectMarketData('123456')

        card = HpsCreditCard()
        card.number = '6011000990156527'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 123

        builder = self.service.charge(17.03)\
            .with_card_holder(card_holder)\
            .with_direct_market_data(direct_market_data)

        if self.use_tokens:
            builder.with_token(self.__class__.discover_token)
        else:
            builder.with_card(card)

        response = builder.execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
开发者ID:hps,项目名称:heartland-python,代码行数:29,代码来源:test_moto.py

示例2: test_011_charge_master_card

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_011_charge_master_card(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860'
        card_holder.address.zip = '75024'

        card = HpsCreditCard()
        card.number = '5473500000000014'
        card.exp_month = 12
        card.exp_year = 2015
        card.cvv = 123

        direct_market_data = HpsDirectMarketData('123456')

        builder = self.service.charge(17.02)\
            .with_card_holder(card_holder)\
            .with_direct_market_data(direct_market_data)

        if self.use_tokens:
            builder.with_token(self.__class__.mastercard_token)
        else:
            builder.with_card(card)

        response = builder.execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
开发者ID:derikrichards,项目名称:heartland-python,代码行数:29,代码来源:test_moto.py

示例3: test_016_authorization_master_card

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_016_authorization_master_card(self):
        # Test 016a Authorization
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860 Dallas Pkwy'
        card_holder.address.zip = '750241234'

        card = HpsCreditCard()
        card.number = '5473500000000014'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 123

        direct_market_data = HpsDirectMarketData('123456')

        response = self.service.authorize(17.07)\
            .with_card(card)\
            .with_card_holder(card_holder)\
            .with_direct_market_data(direct_market_data)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)

        # test 016b Capture/AddToBatch
        capture = self.service.capture(response.transaction_id).execute()
        self.assertIsNotNone(capture)
        self.assertEqual('00', capture.response_code)
开发者ID:hps,项目名称:heartland-python,代码行数:30,代码来源:test_moto.py

示例4: test_013_charge_amex

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_013_charge_amex(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860 Dallas Pkwy'
        card_holder.address.zip = '75024'

        card = HpsCreditCard()
        card.number = '372700699251018'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 1234

        direct_market_data = HpsDirectMarketData('123456')

        builder = self.service.charge(17.04)\
            .with_card_holder(card_holder)\
            .with_direct_market_data(direct_market_data)

        if self.use_tokens:
            builder.with_token(self.__class__.amex_token)
        else:
            builder.with_card(card)

        response = builder.execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
开发者ID:hps,项目名称:heartland-python,代码行数:29,代码来源:test_moto.py

示例5: test_018_partial_approval_visa

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_018_partial_approval_visa(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860'
        card_holder.address.zip = '75024'

        card = HpsCreditCard()
        card.number = '4012002000060016'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 123

        direct_market_data = HpsDirectMarketData('123456')

        response = self.service.charge(130)\
            .with_card(card)\
            .with_card_holder(card_holder)\
            .with_direct_market_data(direct_market_data)\
            .with_allow_partial_auth(True)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('10', response.response_code)
        self.assertIsNotNone(response.authorized_amount)
        self.assertEqual(u'110.00', response.authorized_amount)
开发者ID:hps,项目名称:heartland-python,代码行数:27,代码来源:test_moto.py

示例6: test_021_level_ii_response_b

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_021_level_ii_response_b(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860 Dallas Pkwy'
        card_holder.address.zip = '750241234'

        card = HpsCreditCard()
        card.number = '4012002000060016'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 123

        response = self.service.charge(112.34)\
            .with_card(card)\
            .with_card_holder(card_holder)\
            .with_cpc_req(True)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
        self.assertEqual('B', response.cpc_indicator)

        cpc_data = HpsCPCData('9876543210', HpsTaxType.not_used)
        cpc_response = self.service.cpc_edit(response.transaction_id)\
            .with_cpc_data(cpc_data)\
            .execute()

        self.assertIsNotNone(cpc_response)
        self.assertEqual('00', cpc_response.response_code)
开发者ID:hps,项目名称:heartland-python,代码行数:31,代码来源:test_moto.py

示例7: test_020_partial_approval_master_card

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_020_partial_approval_master_card(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860'
        card_holder.address.zip = '75024'

        direct_market_data = HpsDirectMarketData('123456')

        card = HpsCreditCard()
        card.number = '6011000990156527'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 123

        response = self.service.charge(155)\
            .with_card(card)\
            .with_card_holder(card_holder)\
            .with_direct_market_data(direct_market_data)\
            .with_allow_partial_auth(True)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('10', response.response_code)
        self.assertIsNotNone(response.authorized_amount)
        self.assertEqual(u'100.00', response.authorized_amount)
        self.__class__.test_20_transaction_id = response.transaction_id
开发者ID:hps,项目名称:heartland-python,代码行数:28,代码来源:test_moto.py

示例8: test_023_level_ii_response_r

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_023_level_ii_response_r(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860'
        card_holder.address.zip = '75024'

        card = HpsCreditCard()
        card.number = '4012002000060016'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 123

        response = self.service.charge(123.45)\
            .with_card(card)\
            .with_card_holder(card_holder)\
            .with_cpc_req(True)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
        self.assertEqual('R', response.cpc_indicator)

        cpc_data = HpsCPCData('', HpsTaxType.tax_exempt)
        cpc_response = self.service.cpc_edit(response.transaction_id)\
            .with_cpc_data(cpc_data)\
            .execute()

        self.assertIsNotNone(cpc_response)
        self.assertEqual('00', cpc_response.response_code)
开发者ID:hps,项目名称:heartland-python,代码行数:31,代码来源:test_moto.py

示例9: test_027_level_ii_response_s

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_027_level_ii_response_s(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860'
        card_holder.address.zip = '75024'

        card = HpsCreditCard()
        card.number = '5473500000000014'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 123

        response = self.service.charge(111.08)\
            .with_card(card)\
            .with_card_holder(card_holder)\
            .with_cpc_req(True)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
        self.assertEqual('S', response.cpc_indicator)

        cpc_data = HpsCPCData('9876543210', HpsTaxType.sales_tax, 1.00)
        cpc_response = self.service.cpc_edit(response.transaction_id)\
            .with_cpc_data(cpc_data)\
            .execute()

        self.assertIsNotNone(cpc_response)
        self.assertEqual('00', cpc_response.response_code)
开发者ID:hps,项目名称:heartland-python,代码行数:31,代码来源:test_moto.py

示例10: test_010_charge_visa

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_010_charge_visa(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860 Dallas Pkwy'
        card_holder.address.zip = '75024'

        direct_market_data = HpsDirectMarketData('123456')

        builder = self.service.charge(17.01)\
            .with_card_holder(card_holder)\
            .with_direct_market_data(direct_market_data)

        if self.use_tokens:
            builder.with_token(self.test_data.visa_multi_use_token())
        else:
            builder.with_card(self.test_data.visa_card())

        response = builder.execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)

        # TEST 35 ONLINE VOID
        void_response = self.service.void(response.transaction_id).execute()
        self.assertIsNotNone(void_response)
        self.assertEqual('00', void_response.response_code)
开发者ID:derikrichards,项目名称:heartland-python,代码行数:28,代码来源:moto.py

示例11: test_010_charge_visa

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_010_charge_visa(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860 Dallas Pkwy'
        card_holder.address.zip = '75024'

        card = HpsCreditCard()
        card.number = '4012002000060016'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 123

        direct_market_data = HpsDirectMarketData('123456')

        builder = self.service.charge(17.01)\
            .with_card_holder(card_holder)\
            .with_direct_market_data(direct_market_data)

        if self.use_tokens:
            builder.with_token(self.__class__.visa_token)
        else:
            builder.with_card(card)

        response = builder.execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
        self.__class__.test_10_transaction_id = response.transaction_id
开发者ID:hps,项目名称:heartland-python,代码行数:30,代码来源:test_moto.py

示例12: test_032_level_ii_no_response

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_032_level_ii_no_response(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860'
        card_holder.address.zip = '75024'

        card = HpsCreditCard()
        card.number = '372700699251018'
        card.exp_month = 12
        card.exp_year = 2025
        card.cvv = 1234

        response = self.service.charge(111.13)\
            .with_card(card)\
            .with_card_holder(card_holder)\
            .with_cpc_req(True)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
        self.assertEqual('0', response.cpc_indicator)

        cpc_data = HpsCPCData('9876543210', HpsTaxType.tax_exempt)
        cpc_response = self.service.cpc_edit(response.transaction_id)\
            .with_cpc_data(cpc_data)\
            .execute()

        self.assertIsNotNone(cpc_response)
        self.assertEqual('00', cpc_response.response_code)
开发者ID:hps,项目名称:heartland-python,代码行数:31,代码来源:test_moto.py

示例13: test_004_verify_amex

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_004_verify_amex(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.zip = '75024'

        response = self.service.verify()\
            .with_card(self.test_data.amex_card(cvv=False))\
            .with_card_holder(card_holder)\
            .with_request_multi_use_token(self.use_tokens)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
开发者ID:derikrichards,项目名称:heartland-python,代码行数:15,代码来源:moto.py

示例14: test_008_charge_discover_token

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_008_charge_discover_token(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860'
        card_holder.address.zip = '750241234'

        response = self.service.charge(13.03)\
            .with_card(self.test_data.discover_card())\
            .with_card_holder(card_holder)\
            .with_request_multi_use_token(True)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
开发者ID:derikrichards,项目名称:heartland-python,代码行数:16,代码来源:moto.py

示例15: test_009_charge_amex_token

# 需要导入模块: from securesubmit.entities.credit import HpsCardHolder [as 别名]
# 或者: from securesubmit.entities.credit.HpsCardHolder import address [as 别名]
    def test_009_charge_amex_token(self):
        card_holder = HpsCardHolder()
        card_holder.address = HpsAddress()
        card_holder.address.address = '6860 Dallas Pkwy'
        card_holder.address.zip = '75024'

        response = self.service.charge(13.04)\
            .with_card(self.test_data.amex_card())\
            .with_card_holder(card_holder)\
            .with_request_multi_use_token(True)\
            .execute()

        self.assertIsNotNone(response)
        self.assertEqual('00', response.response_code)
开发者ID:derikrichards,项目名称:heartland-python,代码行数:16,代码来源:moto.py


注:本文中的securesubmit.entities.credit.HpsCardHolder.address方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。