Skip to content

Commit

Permalink
fix: invalid JSON data
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f committed Jan 9, 2025
1 parent e3e6dcf commit 008071c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/nowpayments/nowpayments.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (s *NowPayments) WebhookFunc(w http.ResponseWriter, r *http.Request) {

func (s *NowPayments) CreateInvoice(priceUSD int, orderID string) (string, error) {
url := fmt.Sprintf("%s/v1/invoice", s.apiURL)
jsonStr := fmt.Sprintf(`{"price_amount":%d,"price_currency":"usd","order_id":"%q","is_fee_paid_by_user":true}`,
jsonStr := fmt.Sprintf(`{"price_amount":%d,"price_currency":"usd","order_id":%q,"is_fee_paid_by_user":true}`,
priceUSD, orderID)

req, err := http.NewRequestWithContext(s.ctx, http.MethodPost, url, bytes.NewBufferString(jsonStr))
Expand Down

0 comments on commit 008071c

Please sign in to comment.