Documentation
¶
Overview ¶
Package native Native 支付
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShortUrl ¶
转换短链接
该接口主要用于Native支付模式一中的二维码链接转成短链接(weixin://wxpay/s/XXXXXX),减小二维码数据量,提升扫描速度和精确度。
See: https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_9&index=10
POST https://api.mch.weixin.qq.com/tools/shorturl
Example ¶
package main import ( "fmt" "github.com/fastwego/wxpay" "github.com/fastwego/wxpay/apis/native" ) func main() { var ctx *wxpay.WXPay params := map[string]string{ "appid": "APPID", // ... } resp, err := native.ShortUrl(ctx, params) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.