本文整理汇总了Python中securesubmit.entities.credit.HpsCreditCard.cvv方法的典型用法代码示例。如果您正苦于以下问题:Python HpsCreditCard.cvv方法的具体用法?Python HpsCreditCard.cvv怎么用?Python HpsCreditCard.cvv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类securesubmit.entities.credit.HpsCreditCard
的用法示例。
在下文中一共展示了HpsCreditCard.cvv方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_011_charge_master_card
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例2: test_021_level_ii_response_b
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例3: test_027_level_ii_response_s
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例4: test_018_partial_approval_visa
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例5: test_032_level_ii_no_response
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例6: test_016_authorization_master_card
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例7: test_012_charge_discover
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例8: test_013_charge_amex
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例9: test_010_charge_visa
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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
示例10: test_023_level_ii_response_r
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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)
示例11: test_020_partial_approval_master_card
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [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
示例12: test_037_fraud_prevention_sale
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [as 别名]
def test_037_fraud_prevention_sale(self):
card = HpsCreditCard()
card.number = '4012002000060016'
card.exp_month = 12
card.exp_year = 2025
card.cvv = 123
response = self.service.charge(15000).with_card(card).execute()
self.assertIsNotNone(response)
self.assertEqual('00', response.response_code)
示例13: test_038_fraud_prevention_return
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [as 别名]
def test_038_fraud_prevention_return(self):
card = HpsCreditCard()
card.number = '4012002000060016'
card.exp_month = 12
card.exp_year = 2025
card.cvv = 123
response = self.service.refund(15000).with_card(card).execute()
self.assertIsNotNone(response)
if response.response_code != '00':
self.assertEqual('41', response.response_code)
示例14: test_cvv_with_leading_zero
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [as 别名]
def test_cvv_with_leading_zero(self):
self.charge_service._config = TestServicesConfig.valid_services_config
card = HpsCreditCard()
card.number = "4111111111111111"
card.exp_month = 12
card.exp_year = 2025
card.cvv = "012"
response = self.charge_service.authorize(15.15, 'usd', card)
self.assertIsNotNone(response)
self.assertEquals('00', response.response_code)
示例15: test_034_offline_credit_return
# 需要导入模块: from securesubmit.entities.credit import HpsCreditCard [as 别名]
# 或者: from securesubmit.entities.credit.HpsCreditCard import cvv [as 别名]
def test_034_offline_credit_return(self):
card = HpsCreditCard()
card.number = '5473500000000014'
card.exp_month = 12
card.exp_year = 2025
card.cvv = 123
direct_market_data = HpsDirectMarketData('123456')
response = self.service.refund(15.15)\
.with_card(card)\
.with_direct_market_data(direct_market_data)\
.execute()
self.assertIsNotNone(response)
self.assertEqual('00', response.response_code)