Documentation ¶
Index ¶
- type CloseRequest
- type CloseResponse
- type CreateRequest
- type CreateResponse
- type PaymentApiService
- func (p *PaymentApiService) Close(ctx context.Context, req CloseRequest) (resp *CloseResponse, result *core.APIResult, err error)
- func (p *PaymentApiService) Order(ctx context.Context, req CreateRequest) (resp *CreateResponse, result *core.APIResult, err error)
- func (p *PaymentApiService) Query(ctx context.Context, req QueryRequest) (resp *QueryResponse, result *core.APIResult, err error)
- func (p *PaymentApiService) Refund(ctx context.Context, req RefundRequest) (resp *RefundResponse, result *core.APIResult, err error)
- func (p *PaymentApiService) RefundQuery(ctx context.Context, req RefundQueryRequest) (resp *RefundQueryResponse, result *core.APIResult, err error)
- type QueryRequest
- type QueryResponse
- type RefundQueryRequest
- type RefundQueryResponse
- type RefundRequest
- type RefundResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloseRequest ¶
CloseRequest 订单关闭请求参数
type CloseResponse ¶
type CloseResponse struct { OrderId string `json:"orderId"` // 订单号,调用方传入的订单号 PayId string `json:"payId"` // 支付订单号 AmountPay int32 `json:"amountPay"` // 订单总金额 CloseStatus int8 `json:"-"` // CloseStatusDesc string `json:"closeStatusDesc"` // CloseStatusInt int32 `json:"closeStatus"` // 交易状态 1-关闭成功 2-关闭失败 3-关闭中 }
CloseResponse 订单关闭响应参数
type CreateRequest ¶
type CreateRequest struct { PayMethod int8 `json:"payMethod"` // 1-微信,2-支付宝,3-云闪付 PayScene int8 `json:"payScene"` // 支付场景:1-用户主扫固定码,2-用户主扫动态码,3-用户被扫 AmountPay int32 `json:"amountPay"` // 订单金额:单位为分 OrderId string `json:"orderId"` // 调用方所传入的订单号 Subject string `json:"subject"` // 订单详情 BusinessType int8 `json:"businessType"` // 业务类型 NotifyUrl string `json:"notifyUrl"` // 订单结果回调地址 PayCode string `json:"payCode"` // 支付宝或者微信的二维码值 TimeExpire string `json:"timeExpire"` // 订单失效时间 }
CreateRequest 创建订单请求参数
type CreateResponse ¶
type CreateResponse struct { OrderId string `json:"orderId"` // 订单号,调用方传入的订单号 PayId string `json:"payId"` // payCenter所产生的ID AmountPay int32 `json:"amountPay"` // 订单金额:单位为分 TradeUrl string `json:"tradeUrl"` // 支付地址用户扫码返回 TradeStatus int8 `json:"tradeStatus"` // 交易状态,用户被扫时返回 PayChannel int8 `json:"payChannel"` // 支付渠道 TradeStatusDesc string `json:"tradeStatusDesc"` // 交易状态描述 }
CreateResponse 创建订单响应参数
type PaymentApiService ¶
func (*PaymentApiService) Close ¶
func (p *PaymentApiService) Close(ctx context.Context, req CloseRequest) (resp *CloseResponse, result *core.APIResult, err error)
Close 关闭
func (*PaymentApiService) Order ¶
func (p *PaymentApiService) Order(ctx context.Context, req CreateRequest) (resp *CreateResponse, result *core.APIResult, err error)
Order 下单
func (*PaymentApiService) Query ¶
func (p *PaymentApiService) Query(ctx context.Context, req QueryRequest) (resp *QueryResponse, result *core.APIResult, err error)
Query 查询
func (*PaymentApiService) Refund ¶
func (p *PaymentApiService) Refund(ctx context.Context, req RefundRequest) (resp *RefundResponse, result *core.APIResult, err error)
Refund 退款
func (*PaymentApiService) RefundQuery ¶ added in v0.1.4
func (p *PaymentApiService) RefundQuery(ctx context.Context, req RefundQueryRequest) (resp *RefundQueryResponse, result *core.APIResult, err error)
RefundQuery 退款查询
type QueryRequest ¶
QueryRequest 订单查询请求参数
type QueryResponse ¶
type QueryResponse struct { OrderId string `json:"orderId"` // 订单号,订单 PayId string `json:"payId"` // 商户订单号 AmountPay int32 `json:"amountPay"` // 订单总金额 TradeStatus int8 `json:"tradeStatus"` // 支付结果 TradeStatusDesc string `json:"tradeStatusDesc"` // 交易状态描述 PayTime string `json:"payTime"` // 支付时间 RefundTime string `json:"refundTime,omitempty"` // 退款时间 }
QueryResponse 订单查询响应参数
type RefundQueryRequest ¶ added in v0.1.4
type RefundQueryRequest struct { PayId string `json:"payId" validate:"required_without=OrderId" label:"payId"` //payCenter所产生的ID OrderId string `json:"orderId" validate:"required_without=PayId" label:"orderId"` //订单号,调用方传入的订单号 RefundId string `json:"refundId" validate:"required" label:"refundId"` // 退款Id }
RefundQueryRequest 退款查询请求参数
type RefundQueryResponse ¶ added in v0.1.4
type RefundQueryResponse struct { OrderId string `json:"orderId"` // 订单号 PayId string `json:"payId"` // 商户订单号 RefundId string `json:"refundId"` // 退款单号 AmountPay int32 `json:"amountPay"` // 订单总金额(单位为分) RefundPay int32 `json:"refundPay"` // 退款总金额(单位为分) RefundStatus int32 `json:"refundStatus"` // 退款状态 1-退款成功 2-退款中 3-退款失败 FailureReason string `json:"failureReason"` // 退款失败原因 RefundTime string `json:"refundTime"` // 退款时间 }
RefundQueryResponse 退款查询响应参数
type RefundRequest ¶
type RefundRequest struct { PayId string `json:"payId"` // 支付订单号 OrderId string `json:"orderId"` // 订单号,调用方传入的订单号 NotifyUrl string `json:"notifyUrl"` // 回调地址 }
RefundRequest 退款请求参数
type RefundResponse ¶
type RefundResponse struct { OrderId string `json:"orderId"` // 订单号,调用方传入的订单号 PayId string `json:"payId"` // 商户订单号 RefundId string `json:"refundId"` // 退款单号 AmountPay int32 `json:"amountPay"` // 订单总金额,单位为分, 主扫不返回 TradeStatus int8 `json:"-"` // TradeStatusDesc string `json:"tradeStatusDesc"` // TradeStatusInt int32 `json:"tradeStatus"` // 退款状态 1-退款成功 2-退款失败 3-退款中 RefundFailureReason string `json:"refundFailureReason"` // 退款失败原因 }
RefundResponse 退款响应参数
Click to show internal directories.
Click to hide internal directories.