Installation
$ npm install --save node-weixin-router
Usage
var express = ;var request = ;var session = ;var settings = ; var app = ;var nodeWeixinRouter = ; // 初始化// 其中‘/aaa'是微信的处理前缀地址 // node-weixin的自动接口地址如下:// 1. auth/ack// 服务器自动检验地址// 2. jssdk/config // jssdk的配置请求地址,将会返回配置的json串// 3. oauth/access// Oauth发起请求的地址// 4. oauth/success// OAuth成功后的回调地址// 5. pay/callback// 支付成功或者失败的回调地址// 6. pay/unified// 统一支付发起的接口,由微信的客户端(包括JSSDK)发起。 nodeWeixinRouter; // 添加对订单的处理nodeWeixinRouter; // 添加对Oauth访问的处理,//这里不能调用res.end/res.send等引起res结束的语句nodeWeixinRouter; // 添加对Oauth调用成功的处理nodeWeixinRouter; // 自定义getId函数nodeWeixinRouter {};
License
Apache-2.0 © calidion