gopay

package module
v0.0.0-...-768d9e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

gopay龙飞版

介绍

使用请输入

go get -u gitee.com/wosylf/gopay
//微信请使用
client:=wechat.F新建微信链接(ak,sk)

acc,_:=client.F获取微信token()
client.F发送模板消息(acc.AccessToken,模板消息)  //发送模板消息



	bm := make(gopay.BodyMap)
	bm.Set("subject", "支付标题").
		Set("out_trade_no", "out_trade_no123456").
		Set("total_amount", 0.01)
	bm.Set("return_url", "https://www.baidu.com/pages/login/login")
	bm.Set("quit_url", config.V后端域名)
	// 手机APP支付参数请求
	ord.Payurl, err = client.TradeWapPay(ctx, bm)
	if err != nil {
		return
	}

目前的功能只有微信公众号的一些功能,看后期搬的进度吧 添加钉钉通知,添加支付宝支付

添加一些加密解密方法,方便日常使用,3edsc日常跟Java交互用的比较多

	keystr := "4nQbu你好吗"
	body := "430123211161816"
	str, _ := encrypt.F新建3Desc加解密(keystr).F加密信息(body)
	fmt.Println("str2222;", str)
	str, _ = encrypt.F新建3Desc加解密(keystr).F解密信息(str)
	fmt.Println("str2222;", str)

	打印结果:
	str2222; 1b982a18f507612fcc4579f4b0ee7b24
	str2222; 430123211161816

添加火山人脸识别

S火山 := huoshan.F新建链接(V火山ak, V火山sk, V火山Role, V火山返回url)
S火山.F新建人脸识别("张三","110110198911131213","https://www.baidu.com")

原版为github的 gopay,感觉不太好用,,,还是自己重写一份吧 需要原版的请进入地址:https://github.com/go-pay/gopay/

软件架构

软件架构说明

安装教程
  1. xxxx
  2. xxxx
  3. xxxx
使用说明
  1. xxxx
  2. xxxx
  3. xxxx
参与贡献
  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
特技
  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/

Documentation

Index

Constants

View Source
const (
	NULL     = ""
	SUCCESS  = "SUCCESS"
	FAIL     = "FAIL"
	OK       = "OK"
	DebugOff = 0
	DebugOn  = 1
	Version  = "1.5.72"
)
View Source
const (
	TimeLayout   = "2006-01-02 15:04:05"
	TimeLayout_2 = "20060102150405"
	DateLayout   = "2006-01-02"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyMap

type BodyMap map[string]interface{}

func (BodyMap) CheckEmptyError

func (bm BodyMap) CheckEmptyError(keys ...string) error

func (BodyMap) EncodeAliPaySignParams

func (bm BodyMap) EncodeAliPaySignParams() string

("bar=baz&foo=quux") sorted by key.

func (BodyMap) EncodeURLParams

func (bm BodyMap) EncodeURLParams() string

("bar=baz&foo=quux") sorted by key.

func (BodyMap) EncodeWeChatSignParams

func (bm BodyMap) EncodeWeChatSignParams(apiKey string) string

("bar=baz&foo=quux") sorted by key.

func (BodyMap) Get

func (bm BodyMap) Get(key string) string

获取参数,同 GetString()

func (BodyMap) GetInterface

func (bm BodyMap) GetInterface(key string) interface{}

获取原始参数

func (BodyMap) GetString

func (bm BodyMap) GetString(key string) string

获取参数转换string

func (BodyMap) JsonBody

func (bm BodyMap) JsonBody() (jb string)

func (BodyMap) MarshalXML

func (bm BodyMap) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (BodyMap) Remove

func (bm BodyMap) Remove(key string)

删除参数

func (BodyMap) Reset

func (bm BodyMap) Reset()

置空BodyMap

func (BodyMap) Set

func (bm BodyMap) Set(key string, value interface{}) BodyMap

设置参数

func (BodyMap) SetBodyMap

func (bm BodyMap) SetBodyMap(key string, value func(b BodyMap)) BodyMap

func (BodyMap) SetFormFile

func (bm BodyMap) SetFormFile(key string, file *File) BodyMap

设置 FormFile

func (BodyMap) Unmarshal

func (bm BodyMap) Unmarshal(ptr interface{}) (err error)

Unmarshal to struct or slice point

func (*BodyMap) UnmarshalXML

func (bm *BodyMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type DebugSwitch

type DebugSwitch int8

type File

type File struct {
	Name    string `json:"name"`
	Content []byte `json:"content"`
}

Directories

Path Synopsis
pkg
aes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL