Documentation ¶
Index ¶
- type ProductPay
- type ProductPayBase
- type ProductPayResp
- type ProductReceipt
- type SignBase
- type Sso
- func (c *Sso) CheckSign(sign, randomStr, timeUnix string) bool
- func (c *Sso) GetLoginUrl() string
- func (c *Sso) GetVerifyUrl() string
- func (c *Sso) RunTr(data ProductReceipt, receipt bool) (ProductPayResp, error, int)
- func (c *Sso) SetHost(host string)
- func (c *Sso) Sign() (string, string, string)
- func (c *Sso) TicketGetUser(ticket string) (UserInfo, error)
- func (c *Sso) UidGetUserInfo(uid string) (UserInfo, error)
- func (c *Sso) UrlGen(prefix string, p string) string
- type TicketGetUserReq
- type UserInfo
- type ValidTicketReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductPay ¶
type ProductPay struct { ProductUid string `json:"product_uid" form:"product_uid"` // 商品uid ProductName string `json:"product_name" form:"product_name"` // 商品名 ProductUrl string `json:"product_url" form:"product_url"` // 商品url ProductPrice uint64 `json:"product_price" form:"product_price"` // 商品价格 Remark string `json:"remark" form:"remark"` }
商品支付
type ProductPayBase ¶ added in v1.0.6
type ProductPayBase struct { ProductUid string `json:"product_uid" form:"product_uid"` // 商品uid ProductName string `json:"product_name" form:"product_name" ` // 商品名 必填 ProductUrl string `json:"product_url" form:"product_url" ` // 商品url ProductPrice uint64 `json:"product_price" form:"product_price" ` // 商品价格 必填 Remark string `json:"remark" form:"remark" ` // 备注 UserUid string `json:"user_uid" form:"user_uid" ` // 用户标识符 }
商品支付基础
type ProductPayResp ¶ added in v1.0.6
type ProductPayResp struct { Order string `json:"order" form:"order"` Detail string `json:"detail" form:"detail"` }
商品收款返回
type SignBase ¶ added in v1.0.6
type SignBase struct { Sign string `json:"sign" form:"sign" url:"sign"` RandomStr string `json:"random_str" form:"random_str" url:"random_str"` T string `json:"t" form:"t" url:"t"` // unix时间戳字符串 }
签名请求基础
type Sso ¶ added in v1.0.2
type Sso struct { Host string PublicKey string SecretKey string Prefix string // contains filtered or unexported fields }
var (
Sdk Sso
)
func (*Sso) GetVerifyUrl ¶ added in v1.0.7
GetVerifyUrl 生成核验的url 前端使用iframe post message 获取ticket
func (*Sso) RunTr ¶ added in v1.0.6
func (c *Sso) RunTr(data ProductReceipt, receipt bool) (ProductPayResp, error, int)
RunTr 发起交易 receipt 是否是商品收款
func (*Sso) TicketGetUser ¶ added in v1.0.2
TicketGetUser 通过ticket获取用户
func (*Sso) UidGetUserInfo ¶ added in v1.0.6
UidGetUserInfo 通过uid获取用户信息
type TicketGetUserReq ¶ added in v1.0.9
ticket获取用户
Click to show internal directories.
Click to hide internal directories.