Documentation
¶
Index ¶
Constants ¶
View Source
const ( // 支付成功 ORDER_STATUS_SUCCESS = 0 // 支付取消 ORDER_STATUS_CANCEL = 1 // 支付待处理 ORDER_STATUS_PENDING = 2 )
View Source
const ( // 消耗状态未确认 CONSUME_STATE_UNCONFIRMED = 0 // 消耗状态已确认 CONSUME_STATE_CONFIRMED = 1 )
View Source
const ( // 非消耗商品未确认 ACKNOWLERDGE_STATE_UNCONFIRMED = 0 // 非小号商品已确认 ACKNOWLERDGE_STATE_CONFIRMED = 1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessToken ¶
type AccessToken struct {
// token
AccessToken string `json:"access_token"`
// 有效时间[单位为秒,默认一小时]
ExpiresIn int64 `json:"expires_in"`
// 授权范围
Scope string `json:"scope"`
// token 类型[Bearer]
TokenType string `json:"token_type"`
}
AccessToken
type Config ¶
type Config struct {
// client id
ClientId string `yaml:"client_id"`
// client secret
ClientSecret string `yaml:"client_secret"`
// 包名
PackageName string `yaml:"package_name"`
// 刷新token
RefreshToken string `yaml:"refresh_token"`
// redis缓存token的key(选填)
CacheKey string `yaml:"cache_key"`
// Debug 是否调试模式
Debug bool `yaml:"debug"`
// TimeoutSecond 超时时间
TimeoutSecond int64 `yaml:"timeout_second"`
// Redis 缓存的redis配置[127.0.0.1:6379]
RedisAddr string `yaml:"redis_addr"`
}
Config owechat配置中心
type OrderInfo ¶
type OrderInfo struct {
// 支付时间,毫秒
PurchaseTimeMillis string `json:"purchaseTimeMillis"`
// 支付状态[0: 已购买 1: 已取消 2: 待处理]
PurchaseState int `json:"purchaseState"`
// 应用内商品的消耗状态[0: 尚未消耗 1: 已使用]
ConsumptionState int `json:"consumptionState"`
// 开发者指定的字符串,其中包含关于订单的补充信息
DeveloperPayload string `json:"developerPayload"`
// 订单ID
OrderID string `json:"orderId"`
// 应用内商品的购买类型。
// 仅当购买交易不是使用标准的应用内购买结算流程完成时,系统才会设置此字段。
// 可能的值包括:0. 测试(即从许可测试帐号中购买的服务)1. 促销(即使用促销代码购买)2. 激励广告(即通过观看视频广告而不是付费)
PurchaseType int `json:"purchaseType"`
// 应用内商品的确认状态。可能的值包括:0. 尚未确认 1. 已确认
AcknowledgementState int `json:"acknowledgementState"`
// 表示 android publisher service 中的 inappPurchase 对象
Kind string `json:"kind"`
// 产品被授予时用户的 ISO 3166-1 alpha-2 结算区域代码
RegionCode string `json:"regionCode"`
}
OrderInfo 订单查询信息
Click to show internal directories.
Click to hide internal directories.