Documentation ¶
Index ¶
- Constants
- func MakeRequest(targetID int64, method string, api string, params []string, postBody []byte) ([]byte, error)
- func RandomString(length int) string
- type CallbackState
- type CallbackStruct
- type CallbackType
- type CommonResponse
- type ErrorCodeResponse
- type MerchantCallbackStruct
- type ProcessingState
- type QueryPaymentOrderResponse
- type RequestPaymentOrderRequest
- type SetAPICodeRequest
Constants ¶
View Source
const ( MerchantOrderStatePending = -1 MerchantOrderStateSuccess = 0 MerchantOrderStateExpired = 1 MerchantOrderStateInsufficient = 2 MerchantOrderStateExcess = 3 MerchantOrderStateCancel = 4 )
Variables ¶
This section is empty.
Functions ¶
func MakeRequest ¶
func RandomString ¶
Types ¶
type CallbackState ¶
type CallbackState int64
const ( CallbackStateHolding CallbackState = 1 // Processing batch in KMS (1) CallbackStateInPool CallbackState = 2 // KMS process done, TXID created (2) CallbackStateInChain CallbackState = 3 // TXID in chain (3) CallbackStateFailed CallbackState = 5 // Failed (5) CallbackStateCancelled CallbackState = 8 // cancelled CallbackStateDropped CallbackState = 10 // Dropped CallbackStateInChainFailed CallbackState = 11 // Transaction Failed (11) )
type CallbackStruct ¶
type CallbackStruct struct { Type int `json:"type"` Serial int64 `json:"serial"` OrderID string `json:"order_id"` Currency string `json:"currency"` TXID string `json:"txid"` BlockHeight int64 `json:"block_height"` TIndex int `json:"tindex"` VOutIndex int `json:"vout_index"` Amount string `json:"amount"` Fees string `json:"fees"` Memo string `json:"memo"` BroadcastAt int64 `json:"broadcast_at"` ChainAt int64 `json:"chain_at"` FromAddress string `json:"from_address"` ToAddress string `json:"to_address"` WalletID int64 `json:"wallet_id"` State CallbackState `json:"state"` ConfirmBlocks int64 `json:"confirm_blocks"` ProcessingState ProcessingState `json:"processing_state"` Addon map[string]interface{} `json:"addon"` Decimals int `json:"decimal"` }
type CallbackType ¶
type CallbackType int
const ( DepositCallback CallbackType = 1 WithdrawCallback CallbackType = 2 CollectCallback CallbackType = 3 AirdropCallback CallbackType = 4 )
type CommonResponse ¶
type CommonResponse struct {
Result int64 `json:"result"`
}
type ErrorCodeResponse ¶
type ErrorCodeResponse struct { ErrMsg string `json:"error,omitempty"` ErrCode int `json:"error_code,omitempty"` Message string `json:"message,omitempty"` Blacklist map[string][]string `json:"blacklist,omitempty"` }
func (*ErrorCodeResponse) String ¶
func (m *ErrorCodeResponse) String() string
type MerchantCallbackStruct ¶
type MerchantCallbackStruct struct { MerchantID int64 `json:"merchant_id"` OrderID string `json:"order_id"` Currency string `json:"currency"` TXID string `json:"txid"` RecvAmount string `json:"recv_amount"` BroadcastAt int64 `json:"broadcast_at"` BlockHeight int64 `json:"block_height"` FromAddress string `json:"from_address"` ToAddress string `json:"to_address"` State int64 `json:"state"` Addon map[string]interface{} `json:"addon"` CurrencyBIP44 int64 `json:"currency_bip44"` TokenAddress string `json:"token_address"` Fee string `json:"fee"` Decimals int `json:"decimal"` FeeDecimals int `json:"fee_decimal"` }
type ProcessingState ¶
type ProcessingState int8
const ( ProcessingStateUndefined ProcessingState = -1 ProcessingStateInPool ProcessingState = 0 ProcessingStateInChain ProcessingState = 1 ProcessingStateDone ProcessingState = 2 )
type SetAPICodeRequest ¶
Click to show internal directories.
Click to hide internal directories.