Skip to content

Commit

Permalink
Publish invoice service and routing fees to the rabbitmq/webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi committed Jun 14, 2024
1 parent 692efdc commit d552238
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 d552238

Please sign in to comment.