7 Star 53 Fork 22

北京小程科技有限公司 / 支付宝

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
util.go 290 Bytes
一键复制 编辑 原始数据 按行查看 历史
leexs 提交于 2019-09-27 09:55 . 增加判断授权码和http连接池
package alipay
import "regexp"
// 25~30开头的长度为16~24位的数字,实际字符串长度以开发者获取的付款码长度为准
func IsValidAuthCode(authcode string) (ok bool) {
pattern := "^(2[5-9]|30)[0-9]{14,22}$"
ok, _ = regexp.MatchString(pattern, authcode)
return
}
Go
1
https://gitee.com/xiaochengtech/alipay.git
git@gitee.com:xiaochengtech/alipay.git
xiaochengtech
alipay
支付宝
master

搜索帮助