forked from go-pay/gopay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alipay_client.go
109 lines (74 loc) · 2.37 KB
/
alipay_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
package gopay
import (
"crypto/tls"
)
type aliPayClient struct {
AppId string
MchId string
secretKey string
isProd bool
}
//初始化支付宝客户端
// appId:应用ID
// MchID:商户ID
// isProd:是否是正式环境
// secretKey:key,(当isProd为true时,此参数必传;false时,此参数为空)
func NewAlipayClient(appId, mchId string, isProd bool, secretKey ...string) *aliPayClient {
client := new(aliPayClient)
client.AppId = appId
client.MchId = mchId
client.isProd = isProd
if isProd && len(secretKey) > 0 {
client.secretKey = secretKey[0]
}
return client
}
//alipay.trade.fastpay.refund.query(统一收单交易退款查询)
func (this *aliPayClient) AliPayTradeFastPayRefundQuery() {
}
//alipay.trade.order.settle(统一收单交易结算接口)
func (this *aliPayClient) AliPayTradeOrderSettle() {
}
//alipay.trade.close(统一收单交易关闭接口)
func (this *aliPayClient) AliPayTradeClose() {
}
//alipay.trade.cancel(统一收单交易撤销接口)
func (this *aliPayClient) AliPayTradeCancel() {
}
//alipay.trade.refund(统一收单交易退款接口)
func (this *aliPayClient) AliPayTradeRefund() {
}
//alipay.trade.precreate(统一收单线下交易预创建)
func (this *aliPayClient) AliPayTradePrecreate() {
}
//alipay.trade.create(统一收单交易创建接口)
func (this *aliPayClient) AliPayTradeCreate() {
}
//alipay.trade.pay(统一收单交易支付接口)
func (this *aliPayClient) AliPayTradePay() {
}
//alipay.trade.query(统一收单线下交易查询)
func (this *aliPayClient) AliPayTradeQuery() {
}
//alipay.trade.app.pay(app支付接口2.0)
func (this *aliPayClient) AliPayTradeAppPay() {
}
//alipay.trade.wap.pay(手机网站支付接口2.0)
func (this *aliPayClient) AliPayTradeWapPay() {
}
//alipay.trade.orderinfo.sync(支付宝订单信息同步接口)
func (this *aliPayClient) AliPayTradeOrderinfoSync() {
}
//alipay.trade.page.pay(统一收单下单并支付页面接口)
func (this *aliPayClient) AliPayTradePagePay() {
}
//zhima.credit.score.brief.get(芝麻分普惠版)
func (this *aliPayClient) ZhimaCreditScoreBriefGet() {
}
//zhima.credit.score.get(芝麻分)
func (this *aliPayClient) ZhimaCreditScoreGet() {
}
//向支付宝发送请求
func (this *aliPayClient) doAliPay(body BodyMap, method string, tlsConfig ...*tls.Config) (bytes []byte, err error) {
return bytes, nil
}