2024-06-04 10:09:26 +08:00
|
|
|
package pay
|
|
|
|
|
|
|
|
import (
|
|
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
|
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
VERSION = "2024-06-03"
|
|
|
|
)
|
|
|
|
|
|
|
|
var HOST requests.Host = requests.Host{
|
2024-11-06 14:46:44 +08:00
|
|
|
Default: "pay.api.gaore.com",
|
2024-06-04 10:09:26 +08:00
|
|
|
Func: func(s string) string {
|
|
|
|
var a = map[string]string{
|
2024-11-06 14:46:44 +08:00
|
|
|
requests.RELEASE: "pay.api.gaore.com",
|
|
|
|
requests.PRE: "pay.api.gaore.com",
|
2024-11-27 10:59:22 +08:00
|
|
|
requests.TEST: "pay.gaore.com",
|
2024-06-04 10:09:26 +08:00
|
|
|
}
|
|
|
|
return a[s]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
type Client struct {
|
|
|
|
sdk.Client
|
|
|
|
}
|
|
|
|
|
2024-06-04 11:24:58 +08:00
|
|
|
func NewClient() (client *Client, err error) {
|
|
|
|
client = new(Client)
|
|
|
|
err = client.Init()
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-06-04 10:09:26 +08:00
|
|
|
func (c *Client) ComplaintReply(req *ComplaintReplyRequest) (response *ComplaintReplyResponse, err error) {
|
|
|
|
response = CreateComplaintReplyResponse()
|
|
|
|
err = c.DoAction(req, response)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) ComplaintComplete(req *ComplaintCompleteRequest) (response *ComplaintCompleteResponse, err error) {
|
|
|
|
response = CreateComplaintCompleteResponse()
|
|
|
|
err = c.DoAction(req, response)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) ComplaintUpload(req *ComplaintUploadRequest) (response *ComplaintUploadResponse, err error) {
|
|
|
|
response = CreateComplaintUploadResponse()
|
|
|
|
err = c.DoAction(req, response)
|
|
|
|
return
|
|
|
|
}
|
2024-06-17 16:06:27 +08:00
|
|
|
|
2024-09-30 17:44:22 +08:00
|
|
|
func (c *Client) MerchantConfigDebug(req *merchantConfigDebugRequest) (response *merchantConfigDebugResponse, err error) {
|
2024-09-30 17:41:22 +08:00
|
|
|
response = CreateMerchantConfigDebugResponse()
|
2024-06-17 16:06:27 +08:00
|
|
|
err = c.DoAction(req, response)
|
|
|
|
return
|
|
|
|
}
|