mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2025-08-18 11:41:59 +08:00
修改网关代码的结构,调整了逻辑,删除了许多无用的代码
This commit is contained in:
36
gateway/response/pay_resp.go
Normal file
36
gateway/response/pay_resp.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"gateway/models/merchant"
|
||||
"gateway/models/road"
|
||||
)
|
||||
|
||||
type PayBaseResp struct {
|
||||
Params map[string]string //请求的基本参数
|
||||
ClientIp string //商户ip
|
||||
MerchantInfo merchant.MerchantInfo //商户信息
|
||||
Msg string //信息
|
||||
Code int //状态码 200正常
|
||||
RoadInfo road.RoadInfo
|
||||
RoadPoolInfo road.RoadPoolInfo
|
||||
OrderAmount float64
|
||||
PayWayCode string
|
||||
PlatformRate float64
|
||||
AgentRate float64
|
||||
}
|
||||
|
||||
type ScanSuccessData struct {
|
||||
OrderNo string `json:"orderNo"`
|
||||
Sign string `json:"sign"`
|
||||
OrderPrice string `json:"orderPrice"`
|
||||
PayKey string `json:"payKey"`
|
||||
PayUrl string `json:"payURL"`
|
||||
StatusCode string `json:"statusCode"`
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
|
||||
type ScanFailData struct {
|
||||
PayKey string `json:"payKey"`
|
||||
StatusCode string `json:"statusCode"`
|
||||
Msg string `json:"msg"`
|
||||
}
|
40
gateway/response/payfor_resp.go
Normal file
40
gateway/response/payfor_resp.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package response
|
||||
|
||||
/**
|
||||
* 返回自动代付结果
|
||||
*/
|
||||
type PayForResponse struct {
|
||||
ResultCode string `json:"resultCode,omitempty"`
|
||||
ResultMsg string `json:"resultMsg,omitempty"`
|
||||
MerchantOrderId string `json:"merchantOrderId,omitempty"`
|
||||
SettAmount string `json:"settAmount,omitempty"`
|
||||
SettFee string `json:"settFee,omitempty"`
|
||||
Sign string `json:"sign,omitempty"`
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回商户代付结果查询结果
|
||||
*/
|
||||
type PayForQueryResponse struct {
|
||||
ResultMsg string `json:"resultMsg,omitempty"`
|
||||
MerchantOrderId string `json:"merchantOrderId,omitempty"`
|
||||
SettAmount string `json:"settAmount,omitempty"`
|
||||
SettFee string `json:"settFee,omitempty"`
|
||||
SettStatus string `json:"settStatus,omitempty"`
|
||||
Sign string `json:"sign,omitempty"`
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回商户查询余额结果
|
||||
*/
|
||||
type BalanceResponse struct {
|
||||
ResultCode string `json:"resultCode,omitempty"`
|
||||
Balance string `json:"balance,omitempty"`
|
||||
AvailableAmount string `json:"availableAmount,omitempty"`
|
||||
FreezeAmount string `json:"freezeAmount,omitempty"`
|
||||
WaitAmount string `json:"waitAmount,omitempty"`
|
||||
LoanAmount string `json:"loanAmount,omitempty"`
|
||||
PayforAmount string `json:"payforAmount,omitempty"`
|
||||
ResultMsg string `json:"resultMsg,omitempty"`
|
||||
Sign string `json:"sign,omitempty"`
|
||||
}
|
Reference in New Issue
Block a user