fix exceptions related to btcpay HTTP calls. better cleanup of expired

btcpay invoices.
This commit is contained in:
2020-07-18 10:16:17 -05:00
parent 2f60e2715e
commit e6021324f7
3 changed files with 32 additions and 5 deletions

View File

@ -218,6 +218,10 @@ class DBModel:
else:
return None
def delete_payment_session(self, payment_type, id):
self.cursor.execute( "DELETE FROM payment_sessions WHERE id = %s AND type = %s", (id, payment_type) )
self.connection.commit()
def btcpay_invoice_resolved(self, id, completed):
self.cursor.execute("SELECT email, payment_id FROM unresolved_btcpay_invoices WHERE id = %s ", (id,))
row = self.cursor.fetchone()