generated from NdoleStudio/go-http-client
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2af4689
commit b0cf540
Showing
4 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,4 @@ func MakeRequestCapturingTestServer(responseCode int, response []byte, request * | |
panic(err) | ||
} | ||
})) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,49 @@ | ||
package coinpayments | ||
|
||
// CreatePaymentResponse is the api response after creating a payment | ||
type CreatePaymentResponse struct { | ||
Error string `json:"error"` | ||
Result CreatePaymentResult `json:"result"` | ||
} | ||
|
||
// CreatePaymentResult is the result of creating a payment | ||
type CreatePaymentResult struct { | ||
Amount string `json:"amount"` | ||
Address string `json:"address"` | ||
DestTag string `json:"dest_tag"` | ||
TxnID string `json:"txn_id"` | ||
TransactionID string `json:"txn_id"` | ||
ConfirmsNeeded string `json:"confirms_needed"` | ||
Timeout int `json:"timeout"` | ||
CheckoutURL string `json:"checkout_url"` | ||
StatusURL string `json:"status_url"` | ||
QrcodeURL string `json:"qrcode_url"` | ||
} | ||
|
||
// CreatePaymentRequest are the parameters for creating a payment | ||
type CreatePaymentRequest struct { | ||
Amount string `json:"amount"` | ||
OriginalCurrency string `json:"currency1"` | ||
SendingCurrency string `json:"currency2"` | ||
BuyerEmail string `json:"buyer_email"` | ||
} | ||
|
||
// PaymentIpnRequest is the response we expect back from the server when the command is "api" | ||
type PaymentIpnRequest struct { | ||
Status string `json:"status"` | ||
StatusText string `json:"status_text"` | ||
TxnID string `json:"txn_id"` | ||
Currency1 string `json:"currency1"` | ||
Currency2 string `json:"currency2"` | ||
Amount1 string `json:"amount1"` | ||
Amount2 string `json:"amount2"` | ||
Fee string `json:"fee"` | ||
BuyerName string `json:"buyer_name"` | ||
Email string `json:"email"` | ||
ItemName string `json:"item_name"` | ||
ItemNumber string `json:"item_number"` | ||
Invoice string `json:"invoice"` | ||
Custom string `json:"custom"` | ||
SendTX string `json:"send_tx"` // the tx id of the payment to the merchant. only included when 'status' >= 100 and the payment mode is set to ASAP or nightly or if the payment is paypal passthru | ||
ReceivedAmount string `json:"received_amount"` | ||
ReceivedConfirms string `json:"received_confirms"` | ||
} |