42 lines
1.0 KiB
Go
42 lines
1.0 KiB
Go
package wepay
|
|
|
|
import (
|
|
"time"
|
|
|
|
"go.ipao.vip/atom/container"
|
|
"go.ipao.vip/atom/opt"
|
|
)
|
|
|
|
const DefaultPrefix = "WePay"
|
|
|
|
func DefaultProvider() container.ProviderContainer {
|
|
return container.ProviderContainer{
|
|
Provider: Provide,
|
|
Options: []opt.Option{
|
|
opt.Prefix(DefaultPrefix),
|
|
},
|
|
}
|
|
}
|
|
|
|
type PayNotify struct {
|
|
Mchid string `json:"mchid"`
|
|
Appid string `json:"appid"`
|
|
OutTradeNo string `json:"out_trade_no"`
|
|
TransactionID string `json:"transaction_id"`
|
|
TradeType string `json:"trade_type"`
|
|
TradeState string `json:"trade_state"`
|
|
TradeStateDesc string `json:"trade_state_desc"`
|
|
BankType string `json:"bank_type"`
|
|
Attach string `json:"attach"`
|
|
SuccessTime time.Time `json:"success_time"`
|
|
Payer struct {
|
|
Openid string `json:"openid"`
|
|
} `json:"payer"`
|
|
Amount struct {
|
|
Total int64 `json:"total"`
|
|
PayerTotal int64 `json:"payer_total"`
|
|
Currency string `json:"currency"`
|
|
PayerCurrency string `json:"payer_currency"`
|
|
} `json:"amount"`
|
|
}
|