8000 GitHub - wongyouth/wxpay: A node package for WeChat Pay
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wongyouth/wxpay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wxpay

node version npm version license downloads build status

简介

支持多个商户ID,APPID, API_KEY,所有参数可通过参数传入。 参数使用官网相同的参数名。

目前仅支持统一下单接口

使用方法

const { unifiedOrder } = require('@wongyouth/wxpay')
const result = await unifedOrder({
  appid: '...',
  mch_id: '...',
  openid: '...',
  body: '...',
  total_fee: 101,
  spbill_create_ip: '...',
  api_key: '...'
})

nonce_str, sign 可不用传入,内部会自动取值。

沙盒支持

可通过设置环境变量指定沙盒调用的路径

export WXPAY_BASE_URL=https://api.mch.weixin.qq.com/sandboxnew

About

A node package for WeChat Pay

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0