示例#1
0
 def tx(session):
     wallet = payment.get_wallet(session)
     external_account = wallet.create_account(
         "external account {}".format(time.time()))
     session.flush()
     address = wallet.create_receiving_address(
         external_account,
         "tatianastore credit test {}".format(time.time()))
     return address.address
示例#2
0
        def tx2(session):

            wallet = payment.get_wallet(session)

            # Check the "external" store owner account got the payment
            external_account = wallet.get_or_create_account_by_name("external account")

            # We lose a bit in currency conversions forth and back
            self.assertAlmostEqual(self.btc_price, external_account.balance, 2)

            # This is account where the customer paid and it should be zero after crediting, as the btc has been credited away
            receiving_account = session.query(Account).get(account_id)
            logger.info("Checking account %s", receiving_account)
            self.assertAlmostEqual(receiving_account.balance, 0, 2)
示例#3
0
        def tx2(session):

            wallet = payment.get_wallet(session)

            # Check the "external" store owner account got the payment
            external_account = wallet.get_or_create_account_by_name(
                "external account")

            # We lose a bit in currency conversions forth and back
            self.assertAlmostEqual(self.btc_price, external_account.balance, 2)

            # This is account where the customer paid and it should be zero after crediting, as the btc has been credited away
            receiving_account = session.query(Account).get(account_id)
            logger.info("Checking account %s", receiving_account)
            self.assertAlmostEqual(receiving_account.balance, 0, 2)
示例#4
0
 def tx(session):
     wallet = payment.get_wallet(session)
     external_account = wallet.create_account("external account {}".format(time.time()))
     session.flush()
     address = wallet.create_receiving_address(external_account, "tatianastore credit test {}".format(time.time()))
     return address.address