forked from objcoding/wxpay
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.go
56 lines (50 loc) · 2.9 KB
/
constants.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
package wxpay
// 请求类型定义
type APIType string
const (
APITypeUnifiedOrder APIType = "unifiedorder" // 统一下单
APITypeCloseorder APIType = "closeorder" // 关闭订单
APITypeRefund APIType = "refund" // 申请退款
)
const (
Fail = "FAIL"
Success = "SUCCESS"
HMACSHA256 = "HMAC-SHA256"
MD5 = "MD5"
Sign = "sign"
WxUrl = "https://api.mch.weixin.qq.com"
WxSandboxUrl = "https://api.mch.weixin.qq.com/sandboxnew"
WxpayUrl = "https://api.mch.weixin.qq.com/pay/"
MicroPayUrl = "https://api.mch.weixin.qq.com/pay/micropay"
UnifiedOrderUrl = "https://api.mch.weixin.qq.com/pay/unifiedorder"
OrderQueryUrl = "https://api.mch.weixin.qq.com/pay/orderquery"
ReverseUrl = "https://api.mch.weixin.qq.com/secapi/pay/reverse"
CloseOrderUrl = "https://api.mch.weixin.qq.com/pay/closeorder"
RefundUrl = "https://api.mch.weixin.qq.com/secapi/pay/refund"
RefundQueryUrl = "https://api.mch.weixin.qq.com/pay/refundquery"
DownloadBillUrl = "https://api.mch.weixin.qq.com/pay/downloadbill"
DownloadFundFlowUrl = "https://api.mch.weixin.qq.com/pay/downloadfundflow"
ReportUrl = "https://api.mch.weixin.qq.com/payitil/report"
ShortUrl = "https://api.mch.weixin.qq.com/tools/shorturl"
AuthCodeToOpenidUrl = "https://api.mch.weixin.qq.com/tools/authcodetoopenid"
SandboxMicroPayUrl = "https://api.mch.weixin.qq.com/sandboxnew/pay/micropay"
SandboxUnifiedOrderUrl = "https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder"
SandboxOrderQueryUrl = "https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery"
SandboxReverseUrl = "https://api.mch.weixin.qq.com/sandboxnew/secapi/pay/reverse"
SandboxCloseOrderUrl = "https://api.mch.weixin.qq.com/sandboxnew/pay/closeorder"
SandboxRefundUrl = "https://api.mch.weixin.qq.com/sandboxnew/secapi/pay/refund"
SandboxRefundQueryUrl = "https://api.mch.weixin.qq.com/sandboxnew/pay/refundquery"
SandboxDownloadBillUrl = "https://api.mch.weixin.qq.com/sandboxnew/pay/downloadbill"
SandboxDownloadFundFlowUrl = "https://api.mch.weixin.qq.com/sandboxnew/pay/downloadfundflow"
SandboxReportUrl = "https://api.mch.weixin.qq.com/sandboxnew/payitil/report"
SandboxShortUrl = "https://api.mch.weixin.qq.com/sandboxnew/tools/shorturl"
SandboxAuthCodeToOpenidUrl = "https://api.mch.weixin.qq.com/sandboxnew/tools/authcodetoopenid"
)
const WxTimeFormat = "20060102150405"
type RefundStatus string
const (
RefundStatusSuccess RefundStatus = "SUCCESS"
RefundStatusRefundClose RefundStatus = "REFUNDCLOSE"
RefundStatusProcessing RefundStatus = "PROCESSING"
RefundStatusChange RefundStatus = "CHANGE"
)