diff --git a/CHANGELOG.md b/CHANGELOG.md index 140ea15..9182acf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +v 1.0.1 + - payment: missing PayAmount and PayCurrency fields. #30 + v 1.0.1 - Explicitely add mocks directory and remove pkg package. #28 - Add Go report card to README. #24 diff --git a/cmd/np/main.go b/cmd/np/main.go index b00bc40..a7ca83c 100644 --- a/cmd/np/main.go +++ b/cmd/np/main.go @@ -18,6 +18,7 @@ func main() { paymentID := flag.String("p", "", "status of payment ID") newPayment := flag.Bool("n", false, "new payment") payAmount := flag.Float64("a", 2.0, "pay amount for new payment/invoice") + payCurrency := flag.String("pc", "xmr", "crypto currency to pay in") listPayments := flag.Bool("l", false, "list all payments") debug := flag.Bool("d", false, "turn debugging on") showCurrencies := flag.Bool("c", false, "show list of selected currencies") @@ -96,7 +97,7 @@ func main() { PaymentAmount: payments.PaymentAmount{ PriceAmount: *payAmount, PriceCurrency: "eur", - PayCurrency: "xmr", + PayCurrency: *payCurrency, OrderID: "tool 1", OrderDescription: "Some useful tool", }, diff --git a/payments/payment.go b/payments/payment.go index b526270..6cdc940 100644 --- a/payments/payment.go +++ b/payments/payment.go @@ -51,6 +51,8 @@ type Payment struct { Network string `json:"network"` NetworkPrecision int `json:"network_precision"` PayAddress string `json:"pay_address"` + PayAmount float64 `json:"pay_amount"` + PayCurrency string `json:"pay_currency"` PayinExtraID string `json:"payin_extra_id"` PurchaseID string `json:"purchase_id"` SmartContract string `json:"smart_contract"`