@@ -40,7 +40,7 @@ def payment_received(self, invoice_payment: InvoicePayment, payment_status: Invo
4040
4141 self ._update_invoice_status (invoice_payment .invoice , Invoice .Status .PAID )
4242
43- invoice_payment .invoice .save (username = self .user . username )
43+ invoice_payment .invoice .save (user = self .user )
4444 return self .save_instance (invoice_payment )
4545 except Exception as exc :
4646 return output_exception (model_name = "InvoicePayment" , method = "payment_received" , exception = exc )
@@ -52,7 +52,7 @@ def payment_refunded(self, invoice_payment):
5252 self ._update_payment_status (invoice_payment , InvoicePayment .PaymentStatus .REFUNDED )
5353 self ._update_invoice_status (invoice_payment .invoice , Invoice .Status .SUSPENDED )
5454
55- invoice_payment .invoice .save (username = self .user . username )
55+ invoice_payment .invoice .save (user = self .user )
5656 return self .save_instance (invoice_payment )
5757 except Exception as exc :
5858 return output_exception (model_name = "InvoicePayment" , method = "payment_refunded" , exception = exc )
@@ -65,7 +65,7 @@ def payment_cancelled(self, invoice_payment):
6565 self ._update_payment_status (invoice_payment .invoice , InvoicePayment .PaymentStatus .CANCELLED )
6666 self ._update_invoice_status (invoice_payment .invoice , Invoice .Status .SUSPENDED )
6767
68- invoice_payment .invoice .save (username = self .user . username )
68+ invoice_payment .invoice .save (user = self .user )
6969 return self .save_instance (invoice_payment )
7070 except Exception as exc :
7171 return output_exception (model_name = "InvoicePayment" , method = "payment_refunded" , exception = exc )
0 commit comments