/
userpendingpayment.go
33 lines (26 loc) · 976 Bytes
/
userpendingpayment.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2017-2019 The Fonero developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package commands
// UserPendingPaymentCmd sretrieve the payment details for a pending payment,
// if one exists, for the logged in user.
type UserPendingPaymentCmd struct{}
// Execute executes the user pending payment command.
func (cmd *UserPendingPaymentCmd) Execute(args []string) error {
pppr, err := client.ProposalPaywallPayment()
if err != nil {
return err
}
return printJSON(pppr)
}
// userPendingPaymentHelpMsg is the output for the help command when
// 'userpendingpayment' is specified.
const userPendingPaymentHelpMsg = `userpendingpayment
Get pending payment details for the logged in user.
Arguments: None
Response:
{
"txid" (string) Transaction id
"amount" (uint64) Amount sent to paywall address in atoms
"confirmations" (uint64) Number of confirmations of payment tx
}`