wechat-box

微信工具箱

Usage no npm install needed!

<script type="module">
  import wechatBox from 'https://cdn.skypack.dev/wechat-box';
</script>

README

Wechat Box

Build Status codecov GitHub GitHub package.json version David

wechat box,中文名:“微信盒子”,封装微信公众平台、微信开放平台等相关接口。提供开箱即用的微信应用开发体验。

使用

npm install wechat-box
const WecahtBox = require('wechat-box')

const wechat = new WechatBox({
  appid: '',
  appsecret: '',
  merchantId: '',
  paymentKey: '',
  paymentCertificatePfx: '',
  paymentNotifyUrl: ''
})

wechat.payment.unifiedOrder({...}).then(result => {
  console.log(result)
})

API

unifiedOrder

统一下单

closeOrder

关闭订单