Documentation
¶
Index ¶
- Constants
- Variables
- func Hmac(key, data string) string
- type ApplyPaymentResp
- type ApplyPaymentResponse
- type BaseResp
- type Client
- func (client *Client) ApplyPayment(orderSn, clientIp string) (resp *ApplyPaymentResponse, err error)
- func (client *Client) Do(req Request, params map[string]interface{}, res Response) (err error)
- func (client *Client) OrderCancel(orderSn string) (resp *OrderCancelResponse, err error)
- func (client *Client) OrderCreate(req *OrderCreateReq) (resp *OrderCreateResponse, err error)
- func (client *Client) OrderInfoList(orderSnList string) (resp *OrderInfoListResponse, err error)
- func (client *Client) SelectAddress(areaCode string) (resp *SelectAddressResponse, err error)
- type OrderCancelResp
- type OrderCancelResponse
- type OrderCreateReq
- type OrderCreateResp
- type OrderCreateResponse
- type OrderInfoListResp
- type OrderInfoListResponse
- type Request
- type Response
- type SelectAddressRequest
- type SelectAddressResp
- type SelectAddressResponse
- type VipApiEncrypt
Constants ¶
View Source
const ( Format = "JSON" Service = "com.vip.wpc.ospservice.vop.WpcVopOspService" Domain = "https://gw.vipapis.com" Version = "1.0.0" )
base
View Source
const ( ApplyPaymentMethod = "applyPayment" OrderCreateMethod = "orderCreate" OrderCancelMethod = "orderCancel" SelectAddressMethod = "selectAddress" GetOrderInfoListMethod = "getOrderInfoList" )
method
View Source
const ( DefaultPage = 1 DefaultPageSize = 20 )
Default pagination parameters
Variables ¶
View Source
var ( // ErrInvalidOrderCreate invalid order create params ErrInvalidOrderCreate = errors.New("invalid order create params") // ErrOrderSnRequired order number required ErrOrderSnRequired = errors.New("order number required") // ErrOrderSnAndIpRequired order number or ip is empty ErrOrderSnOrIpEmpty = errors.New("order number or ip is empty") )
Functions ¶
Types ¶
type ApplyPaymentResp ¶
type ApplyPaymentResp struct { BaseResp Result struct { ApplySuccess bool `json:"applySuccess"` FailReason string `json:"failReason"` } `json:"result"` }
申请代扣
type ApplyPaymentResponse ¶
type ApplyPaymentResponse struct {
ApplyPaymentResp
}
func (*ApplyPaymentResponse) String ¶
func (resp *ApplyPaymentResponse) String() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
The client saves some private required fields. Before executing the request, a new Client must be created.
func (*Client) ApplyPayment ¶
func (client *Client) ApplyPayment(orderSn, clientIp string) (resp *ApplyPaymentResponse, err error)
func (*Client) OrderCancel ¶
func (client *Client) OrderCancel(orderSn string) (resp *OrderCancelResponse, err error)
func (*Client) OrderCreate ¶
func (client *Client) OrderCreate(req *OrderCreateReq) (resp *OrderCreateResponse, err error)
func (*Client) OrderInfoList ¶
func (client *Client) OrderInfoList(orderSnList string) (resp *OrderInfoListResponse, err error)
func (*Client) SelectAddress ¶
func (client *Client) SelectAddress(areaCode string) (resp *SelectAddressResponse, err error)
type OrderCancelResp ¶
type OrderCancelResp struct { BaseResp Result struct { Code int `json:"code"` Msg string `json:"msg"` } `json:"result"` }
取消订单
type OrderCancelResponse ¶
type OrderCancelResponse struct {
OrderCancelResp
}
func (*OrderCancelResponse) String ¶
func (resp *OrderCancelResponse) String() string
type OrderCreateReq ¶
type OrderCreateResp ¶
type OrderCreateResp struct { BaseResp Result struct { Orders []struct { OrderSn string `json:"orderSn"` } `json:"orders"` } `json:"result"` }
创建订单
type OrderCreateResponse ¶
type OrderCreateResponse struct {
OrderCreateResp
}
func (*OrderCreateResponse) String ¶
func (resp *OrderCreateResponse) String() string
type OrderInfoListResp ¶
type OrderInfoListResp struct { BaseResp Result []struct { ChildOrderSnList []struct { RealPayTotal string `json:"RealPayTotal"` ShippingFee string `json:"ShippingFee"` Goods []struct { GoodFullID string `json:"goodFullId"` Price string `json:"price"` SizeID string `json:"sizeId"` SizeNum int64 `json:"sizeNum"` } `json:"goods"` OrderSn string `json:"orderSn"` RefundStatus int64 `json:"refundStatus"` StatusCode int64 `json:"statusCode"` StatusName string `json:"statusName"` TransportNo string `json:"transportNo"` TransportName string `json:"transportName"` } `json:"childOrderSnList"` ParentOrderSn string `json:"parentOrderSn"` } `json:"result"` }
订单状态信息
type OrderInfoListResponse ¶
type OrderInfoListResponse struct {
OrderInfoListResp
}
func (*OrderInfoListResponse) String ¶
func (resp *OrderInfoListResponse) String() string
type SelectAddressRequest ¶
type SelectAddressRequest struct{}
func (SelectAddressRequest) ApiMethod ¶
func (a SelectAddressRequest) ApiMethod() string
func (SelectAddressRequest) RequestMethod ¶
func (a SelectAddressRequest) RequestMethod() string
type SelectAddressResp ¶
type SelectAddressResp struct { BaseResp Result struct { ChildList []struct { AreaCode string `json:"areaCode"` AreaName string `json:"areaName"` } `json:"childList"` Info struct { AreaCode string `json:"areaCode"` AreaName string `json:"areaName"` } `json:"info"` } `json:"result"` }
查询地址库
type SelectAddressResponse ¶
type SelectAddressResponse struct {
SelectAddressResp
}
func (*SelectAddressResponse) String ¶
func (resp *SelectAddressResponse) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.