All Projects → aimuz → wechat-sdk

aimuz / wechat-sdk

Licence: Apache-2.0 License
微信登录支付sdk,支持小程序,APP登录,正在重构。QQ群:879729420

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to wechat-sdk

Wechatpy
WeChat SDK for Python
Stars: ✭ 3,016 (+4031.51%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
Go Workwx
a sensible Work Weixin(企业微信, Wechat Work) SDK for Go
Stars: ✭ 181 (+147.95%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
Python Weixin
微信(weixin|wechat) Python SDK 支持开放平台和公众平台 支持微信小程序云开发
Stars: ✭ 746 (+921.92%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
Fastbootweixin
基于Spring Boot的注解驱动式公众号极速开发框架,用注解重新定义公众号开发
Stars: ✭ 640 (+776.71%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
Weixinmpsdk
微信全平台 SDK Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 6.0。已支持微信公众号、小程序、小游戏、企业号、企业微信、开放平台、微信支付、JSSDK、微信周边等全平台。 WeChat SDK for C#.
Stars: ✭ 7,098 (+9623.29%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
go-wechat
💥weixin、wechat、微信公众平台、企业微信 golang/go sdk
Stars: ✭ 18 (-75.34%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
Weixin Sdk
微信公众平台(订阅号、服务号、企业号、小程序)、微信开放平台和微信支付 Java SDK
Stars: ✭ 933 (+1178.08%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
Wechat
Wechat API wrapper in Elixir
Stars: ✭ 70 (-4.11%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
Werobot
WeRoBot 是一个微信公众号开发框架
Stars: ✭ 3,973 (+5342.47%)
Mutual labels:  weixin, wechat-sdk, weixin-sdk
Weixin Java Miniapp Demo
基于Spring Boot 和 WxJava 实现的微信小程序Java后端Demo
Stars: ✭ 779 (+967.12%)
Mutual labels:  weixin, wechat-sdk
Node Tenpay
微信支付 for nodejs
Stars: ✭ 947 (+1197.26%)
Mutual labels:  weixin, wechat-pay
Offiaccount
[微信公众号] A fast wechat offiaccount development sdk written in Golang
Stars: ✭ 68 (-6.85%)
Mutual labels:  weixin, weixin-sdk
Wxpay Sdk
最新最全微信支付集成SDK,一行代码调用微信支付,包含基础支付功能(网页授权、各种签名、统一下单、退款、对账单、用户信息获取)、验收用例指引(沙箱支付、支付验收、免充值产品开通)、商户平台(现金红包、企业付款到用户、代金券或立减优惠)、公众平台(微信卡券、社交立减金活动)、小程序(生成永久二维码、发送模版消息)等等更多丰富接口注释和例子。
Stars: ✭ 443 (+506.85%)
Mutual labels:  weixin, weixin-sdk
Typescript Wxapi.d.ts
🦉微信小程序typescript的声明文件
Stars: ✭ 133 (+82.19%)
Mutual labels:  weixin, weixin-sdk
Weixin Java Cp Demo
基于Spring Boot 和 WxJava 实现的微信企业号/企业微信 后端Demo
Stars: ✭ 175 (+139.73%)
Mutual labels:  weixin, wechat-sdk
H5huodong
此地址项目不再维护,代码迁移至 https://github.com/zhangdaiscott/jeewx-boot
Stars: ✭ 209 (+186.3%)
Mutual labels:  weixin, weixin-sdk
wechat-starter-boot-spring
简化微信对接流程,避免重复性工作和填坑
Stars: ✭ 22 (-69.86%)
Mutual labels:  wechat-sdk, wechat-pay
wxpay-gitbook
微信支付文档: https://yclimb.gitbook.io/wxpay/
Stars: ✭ 45 (-38.36%)
Mutual labels:  weixin, weixin-sdk
Weixin rails middleware
微信集成 ruby weixin_rails_middleware for integration weixin.
Stars: ✭ 414 (+467.12%)
Mutual labels:  weixin, wechat-sdk
Weixin Popular
微信SDK JAVA (公众平台、开放平台、 商户平台、 服务商平台)
Stars: ✭ 2,384 (+3165.75%)
Mutual labels:  weixin, weixin-sdk

wechat-sdk

Go Report Card Build Status

最全最好用的微信SDK,支持APP,小程序,H5,Web登录支付,企业付款等功能

快速开始

以下是APP和小程序支付简单例子

import "github.com/aimuz/wechat-sdk/pay"

wePay := &WePay{
	AppId:     "xxx",
	MchId:     "xxx",
	PayKey:    "xxx",
	NotifyUrl: "xxx",
	TradeType: "xxx", // APP支付填写`APP`,小程序支付填写`JSAPI`
	Body:      "xxx",
}

# APP支付
results, outTradeNo, err := wePay.AppPay(100) // 金额,以分为单位

# 小程序支付
results, outTradeNo, err := wePay.WaxPay(100, "open_id") // 金额,以分为单位;open_id为获取的用户的open_id

使用

小程序支付通知

waxNotify := pay.WaxPayNotifyReq{}
ctx.ReadXML(&waxNotify)
verifyParams := pay.WaxVerifyParams(waxNotify)
valid := pay.WaxpayVerifySign(verifyParams, appKey, waxNotify.Sign) //appKey 为自己在微信支付后台设置的API密钥

resp := new(pay.WaxPayNotifyResp)

if valid {
	// 业务处理逻辑···
	resp.ReturnCode = "SUCCESS"
	resp.ReturnMsg = "OK"
} else {
	// 错误处理逻辑···
	resp.ReturnCode = "FAIL"
	resp.ReturnMsg = "Verify Failed"
}

发送普通红包

wx := &WePay{
	AppID:      "xx",
	PayKey:     "xx",
	MchID:      "xx",
	TradeType:  "xx",
	CertFile:   "xx", // 证书路径
	keyFile:    "xx", // 证书秘钥路径
	RootCaFile: "xx", // 根证书路径
}

billNO, redPackResp, err := wx.SendRedPack(totalAmount, openID, sendName, wishing, actName, remark)

APP支付

APP简单使用

讨论

issues

论坛

支持功能

  • APP支付
  • APP登录
  • H5登录
  • 小程序登录
  • 小程序支付
  • Web登录
  • 公众号支付
  • 扫码支付
  • 刷卡支付
  • 企业付款
  • 现金红包
    • 发送红包
    • 裂变红包
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].