def test_auth_and_settle_card_present_transaction(self):
        transaction = FULL_CARD_PRESENT_TRANSACTION.copy()
        amount = random.randrange(100, 100000) / 100.0
        transaction['amount'] = amount
        result = Transaction.auth(transaction)
        Transaction.settle(result.transaction_response.trans_id, amount)

        transaction_details = Transaction.details(result.transaction_response.trans_id)
        self.assertEqual(transaction_details.transaction.auth_amount, '%.2f' % amount)
        self.assertEqual(transaction_details.transaction.settle_amount, '%.2f' % amount)
    def test_auth_and_settle_card_present_transaction(self):
        transaction = FULL_CARD_PRESENT_TRANSACTION.copy()
        amount = random.randrange(100, 100000) / 100.0
        transaction['amount'] = amount
        result = Transaction.auth(transaction)
        Transaction.settle(result.transaction_response.trans_id, amount)

        transaction_details = Transaction.details(result.transaction_response.trans_id)
        self.assertEqual(transaction_details.transaction.auth_amount, '%.2f' % amount)
        self.assertEqual(transaction_details.transaction.settle_amount, '%.2f' % amount)
예제 #3
0
 def test_auth_and_settle_transaction(self):
     transaction = FULL_CARD_TRANSACTION.copy()
     transaction['amount'] = random.randrange(100, 100000) / 100.0
     result = Transaction.auth(transaction)
     Transaction.settle(result.transaction_response.trans_id)
 def test_auth_and_settle_transaction(self):
     transaction = FULL_CARD_TRANSACTION.copy()
     transaction['amount'] = random.randrange(100, 100000) / 100.0
     result = Transaction.auth(transaction)
     Transaction.settle(result.transaction_response.trans_id)