Skip to content

Commit

Permalink
Merge pull request #492 from getAlby/publish-fees
Browse files Browse the repository at this point in the history
Publish invoice service and routing fees to the rabbitmq/webhook
  • Loading branch information
bumi authored Jun 17, 2024
2 parents 75c3f5e + d552238 commit a7e0ab1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/service/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ type WebhookInvoicePayload struct {
UserLogin string `json:"user_login"`
Amount int64 `json:"amount"`
Fee int64 `json:"fee"`
ServiceFee int64 `json:"service_fee"`
RoutingFee int64 `json:"routing_fee"`
Memo string `json:"memo"`
DescriptionHash string `json:"description_hash,omitempty"`
PaymentRequest string `json:"payment_request"`
Expand Down Expand Up @@ -114,6 +116,8 @@ func ConvertPayload(invoice models.Invoice, user *models.User) (result WebhookIn
UserLogin: user.Login,
Amount: invoice.Amount,
Fee: invoice.Fee,
ServiceFee: invoice.ServiceFee,
RoutingFee: invoice.RoutingFee,
Memo: invoice.Memo,
DescriptionHash: invoice.DescriptionHash,
PaymentRequest: invoice.PaymentRequest,
Expand Down

0 comments on commit a7e0ab1

Please sign in to comment.