bb1e86c790
issue: https://github.com/storj/storj/issues/4824 Change-Id: I2e3e63151d1def96270279719f6eceda0acba66c
20 lines
467 B
Go
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()
|
|
}
|