Skip to content

Commit

Permalink
payment: missing PayAmount and PayCurrency fields (#31)
Browse files Browse the repository at this point in the history
Fixes #30
  • Loading branch information
matm authored Jan 5, 2023
1 parent 787ec86 commit 0f06b79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion cmd/np/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -96,7 +97,7 @@ func main() {
PaymentAmount: payments.PaymentAmount{
PriceAmount: *payAmount,
PriceCurrency: "eur",
PayCurrency: "xmr",
PayCurrency: *payCurrency,
OrderID: "tool 1",
OrderDescription: "Some useful tool",
},
Expand Down
2 changes: 2 additions & 0 deletions payments/payment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 0f06b79

Please sign in to comment.