stripe tested and working

This commit is contained in:
2020-05-12 13:04:35 -05:00
parent 55d8d8a9a6
commit 7337375ae8
3 changed files with 15 additions and 8 deletions

View File

@ -154,7 +154,7 @@ class DBModel:
def create_stripe_checkout_session(self, id, email, dollars):
self.cursor.execute("""
INSERT INTO stripe_checkout_sessions (id, email, dollars)
VALUES (%s, %s, %d)
VALUES (%s, %s, %s)
""",
(id, email, dollars)
)
@ -174,7 +174,7 @@ class DBModel:
""")
# not sure what to do here. For now just log and do nothing.
self.cursor.execute( "DELETE FROM stripe_checkout_sessions WHERE id = %s", (id,) )
self.cursor.execute( "INSERT INTO payments (email, dollars) VALUES (%s, %d)", (rows[0][0], rows[0][1]) )
self.cursor.execute( "INSERT INTO payments (email, dollars) VALUES (%s, %s)", (rows[0][0], rows[0][1]) )
self.connection.commit()
return rows[0][0]
else: