예제 #1
0
 def test_charge_fail(self):
     transaction = Transaction(api_key='apikey',
                               amount=314,
                               card_hash='foobar',
                               payment_method='credit_card',
                               installments=1,
                               postback_url='https://post.back.url')
     with self.assertRaises(PygarmeTransactionApiError):
         transaction.charge()
예제 #2
0
 def test_charge(self):
     transaction = Transaction(api_key='apikey',
                               amount=314,
                               card_hash='foobar',
                               payment_method='credit_card',
                               installments=1,
                               postback_url='https://post.back.url')
     transaction.charge()
     self.assertEqual('processing', transaction.status)
예제 #3
0
 def test_charge_fail(self):
     transaction = Transaction(api_key='apikey', amount=314, card_hash='foobar', payment_method='credit_card', installments=1, postback_url='https://post.back.url')
     with self.assertRaises(PygarmeTransactionApiError):
         transaction.charge()
예제 #4
0
 def test_charge(self):
     transaction = Transaction(api_key='apikey', amount=314, card_hash='foobar', payment_method='credit_card', installments=1, postback_url='https://post.back.url')
     transaction.charge()
     self.assertEqual('processing', transaction.status)