Code Monkey home page Code Monkey logo

node-wechat-pay's Introduction

node-wechat-pay © mengkeys

特别提示:本库尚未完成,请勿使用。

♥ 本模块所涵盖微信支付功能

序号 功能 支持情况 文档链接
0 θ 微信支付官方文档
1 刷卡支付 微信支付官方文档-刷卡支付
2 扫码支付 微信支付官方文档-扫码支付
3 公众号支付 微信支付官方文档-公众号支付
4 APP支付 × 微信支付官方文档-APP支付
5 代金券或立减优惠 微信支付官方文档-代金券或立减优惠
6 红包 微信支付官方文档-现金红包
7 企业付款 微信支付官方文档-企业付款
8 JSAPI θ 微信支付官方文档-JSAPI文档

♥ 模块结构

序号 模块 名称 说明
1 Payment 支付模块 微信支付主要功能
2 Utils 工具库 微信支付相关的功能库
3 Meddleware 中间件 微信支付相关中间件

♥ 工具库

序号 函数 功能 版本
1 timeStamp 生成时间戳 1.0.0
2 nonceStr 生成随机字符串 1.0.0
3 jsToXml 转换(JS->XML) 1.0.0
4 xmlToJs 转换(XML->JS) 1.0.0
5 md5 加密(MD5) 1.0.0
6 sha1 加密(SHA1) 1.0.0
7 sort 字典排序 1.0.0
8 queryString 查询字符串 1.0.0
9 signValue 签名 1.0.0

♥ 中间件

序号 函数 功能 版本
1 notice 支付成功通知中间件 1.0.0

♥ 接口列表

序号 函数 功能 版本
1 unifiedorder 统一下单接口 1.0.0
2 orderquery 查询订单接口 1.0.0
3 closeorder 关闭订单接口 1.0.0
4 refund 申请退款接口 1.0.0
5 refundquery 查询退款接口 1.0.0
6 downloadbill 下载对账单接口 1.0.0
7 report 交易保障接口 1.0.0
8 shorturl 转换短链接接口 1.0.0
9 authcodetoopenid 授权码查询OPENID接口 1.0.0
10 micropay 提交刷卡支付接口 1.0.0
11 reverse 撤销订单接口 1.0.0
12 获取接口参数 1.0.0
13 1.0.0
14 1.0.0

♥ 模块使用指南

♠ 安装依赖

(c)npm install node-wechat-pay --save

♠ 模块引入

var Payment = require('node-wechat-pay').payment;

♠ 对象实例化

var payment = new Payment(options);

♠ 接口调用

payment.unifiedorder(options, callback);

♠ 工具使用

var Utils = require('node-wechat-pay').utils;
var md5Str = Utils.md5(str);

♠ 中间件使用

var Meddleware = require('node-wechat-pay').Middleware;

♠ 以Exress为例

app.get('/notice', Middleware, function(req, res, next){
   // 自己的逻辑,中间件处理结果将被传入req对象中。
});

相关链接

项目仓库 项目主页 提交Bug

更多...

node-wechat-pay's People

Contributors

mengkeys avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.