All Projects → tvrcgo → weixin-redpack

tvrcgo / weixin-redpack

Licence: MIT license
微信红包 (wechat redpack, weixin redpack)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to weixin-redpack

Wxapp Redux Starter
微信小程序,集成redux,并且提供了方便快捷的开发环境;内置好奇心日报Demo...
Stars: ✭ 205 (+425.64%)
Mutual labels:  weixin
Weapp Workflow
基于Gulp 的微信小程序前端开发工作流 💯
Stars: ✭ 241 (+517.95%)
Mutual labels:  weixin
Miniapp Toutiao
🍭🔥🔥 微信小程序-仿今日头条
Stars: ✭ 254 (+551.28%)
Mutual labels:  weixin
H5huodong
此地址项目不再维护,代码迁移至 https://github.com/zhangdaiscott/jeewx-boot
Stars: ✭ 209 (+435.9%)
Mutual labels:  weixin
Wxa Plugin Canvas
小程序海报组件-生成朋友圈分享海报并生成图片
Stars: ✭ 2,692 (+6802.56%)
Mutual labels:  weixin
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (+538.46%)
Mutual labels:  weixin
Weixin Popular
微信SDK JAVA (公众平台、开放平台、 商户平台、 服务商平台)
Stars: ✭ 2,384 (+6012.82%)
Mutual labels:  weixin
wxwork
[企业微信] A fast wxwork development sdk written in Golang
Stars: ✭ 112 (+187.18%)
Mutual labels:  weixin
Vant Weapp
轻量、可靠的小程序 UI 组件库
Stars: ✭ 15,428 (+39458.97%)
Mutual labels:  weixin
Jeecg Uniapp
JEECG BOOT APP移动解决方案,采用Uniapp+ColorUI 框架,一份代码解决多终端适配(APP、小程序、H5)
Stars: ✭ 250 (+541.03%)
Mutual labels:  weixin
Sactive Bot
😈 An extensible chat bot framework. sactive-bot is an evolution of the open source hubot project. - https://www.shipengqi.top/sactive-bot .
Stars: ✭ 212 (+443.59%)
Mutual labels:  weixin
Didi
🚗 mpvue框架仿滴滴出行微信小程序
Stars: ✭ 222 (+469.23%)
Mutual labels:  weixin
Think Wechat
easywechat for thinkphp support
Stars: ✭ 250 (+541.03%)
Mutual labels:  weixin
Weiya
尾牙小程序
Stars: ✭ 207 (+430.77%)
Mutual labels:  weixin
wx iciba
金山词霸(iciba)基于微信小程序wepy版本,可做wepy学习案例,
Stars: ✭ 29 (-25.64%)
Mutual labels:  weixin
Wechatplugin Macos
No description or website provided.
Stars: ✭ 13,280 (+33951.28%)
Mutual labels:  weixin
Pinche xcx data
同城拼车微信小程序后端代码
Stars: ✭ 244 (+525.64%)
Mutual labels:  weixin
wxpusher-sdk-go
微信消息实时推送服务[WxPusher]的go版本sdk,可以通过API实时给个人微信推送消息。wechat pusher.
Stars: ✭ 49 (+25.64%)
Mutual labels:  weixin
weixin-sdk
www.docs4dev.com/
Stars: ✭ 19 (-51.28%)
Mutual labels:  weixin
Wechatkit
一款快速实现微信第三方登录的框架(Swift版) SDK 1.8.5
Stars: ✭ 249 (+538.46%)
Mutual labels:  weixin

weixin-redpack

微信发企业红包 for node.js

Installation

npm install weixin-redpack

Usage

先创建一个红包实例 Redpack,再调用 send() 发送红包,减少每次发红包的参数。

var Redpack = require('weixin-redpack').Redpack;

var redpack = Redpack({
	mch_id: 'xxx',
	partner_key: 'xxxxxx',
	pfx: fs.readFileSync('./wxpay_cert.p12'),
	wxappid: 'wxxxxxxx'
});

redpack.send({
	mch_billno: '123426900220150325'+Math.random().toString().substr(2,10),
	send_name: '红包来自',
	wishing: '收好不谢!',
	re_openid: '红包接收人openid',
	total_amount: 100,
	total_num: 1,
	client_ip: '14.23.102.146',
	nick_name: 'XXXX',
	act_name: '发测试红包',
	remark: 'remark'
}, function(err, result){
	console.log(result);
})

直接调用 sendRedpack() 输入所有参数。

var wxredpack = require('weixin-redpack');

wxredpack.sendRedpack({
  mch_id: 'xxx',
  partner_key: 'xxxxxxx',
  pfx: fs.readFileSync('./application_cert.p12'),
  wxappid: 'wxxxxxx',
  mch_billno: '1234567890201503251234567890',
  nick_name: 'nickname',
  send_name: 'sendname',
  re_openid: '红包接收人openid'
  total_amount: 100,
  max_value: 100,
  min_value: 100,
  total_num: 1,
  wishing: 'thanks',
  client_ip: '192.168.1.10',
  act_name: '发红包啦',
  remark: '收好不谢!'
}, function(err, result){
  console.log(result);
});
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].