storj/satellite/payments/coinpayments/urls.go
Yaroslav Vorobiov bb1e86c790 satellite: remove unused coinpayments code and chores
issue: https://github.com/storj/storj/issues/4824

Change-Id: I2e3e63151d1def96270279719f6eceda0acba66c
2022-11-30 16:24:48 +00:00

20 lines
467 B
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package coinpayments
import "net/url"
// GetCheckoutURL constructs checkout url from auth key and transaction id.
func GetCheckoutURL(key string, id TransactionID) string {
u, _ := url.Parse("https://coinpayments.net/index.php")
query := u.Query()
query.Add("cmd", "checkout")
query.Add("id", id.String())
query.Add("key", key)
u.RawQuery = query.Encode()
return u.String()
}