Пример #1
0
 def test_firstDepFail(self):
     pan_in = '4876010123456789012'
     with dep.DEPConnection(['127.0.0.1', ADDR_MOCK_DEP]) as depco:        
         _, _, key = pci.hashPan(pan_in, depco)
     self.assertEqual(key, 73)
Пример #2
0
 def test_creditPanHashing(self):
     pan_in = '45066301234567890'
     pan_hashed, pan_out, key = pci.hashPan(pan_in, self.depco)
     self.assertEqual(pan_hashed, 'E38B74E6F80849F3ADF2D65AA5CFA2DB058DA1E63275C8A461810EA850E8F03A')
     self.assertEqual(pan_in, pan_out)
     self.assertEqual(key, 14)
Пример #3
0
 def test_vpayPanHashing(self):
     pan_in = '4876010123456789012'
     pan_hashed, pan_out, key = pci.hashPan(pan_in, self.depco)
     self.assertEqual(pan_hashed, '36C0EDD9104822CD4B099A0DF4FA0E28DA608ED9F46802FC8AC07657F1AAE18B')
     self.assertEqual(pan_in, pan_out)
     self.assertEqual(key, 73)
Пример #4
0
 def test_debitPanHashing(self):
     pan_in = '67031234567891234'
     pan_hashed, pan_out, key = pci.hashPan(pan_in, self.depco)
     self.assertEqual(pan_hashed, '3A80F61D36EBCD06E635CE53562B98053A296E6492999A7E7AAA3B4AC70FA46E')
     self.assertEqual(pan_in, pan_out)
     self.assertEqual(key, 82)