def payin(self):
        """The first stage of payday where we charge credit cards and transfer
        money internally between participants.
        """
        with self.db.get_cursor() as cursor:
            self.prepare(cursor)
            holds = self.create_card_holds(cursor)
            self.process_payment_instructions(cursor)
            self.transfer_takes(cursor, self.ts_start)
            self.process_draws(cursor)
            payments = cursor.all("""
                SELECT * FROM payments WHERE "timestamp" > %s
            """, (self.ts_start,))
            try:
                self.settle_card_holds(cursor, holds)
                self.update_balances(cursor)
                check_db(cursor)
            except:
                # Dump payments for debugging
                import csv
                from time import time
                with open(time() % '%s_payments.csv', 'wb') as f:
                    csv.writer(f).writerows(payments)
                raise
        self.take_over_balances()
dataset/ETHPy150Open gratipay/gratipay.com/gratipay/billing/payday.py/Payday.payin/swapped operands of `%`