Notoriously Problematic Merge

    @leekafai/mbd-pay
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published
    • [x] wechat JSAPI
    • [x] wechat H5
    • [x] wechat openid
    • [x] alipay
    • [x] query
    • [x] refund

    install

    npm i @leekafai/mbd-pay
    

    usage

    const Mbdpay=require('Mbdpay')
    const mbdPay = new Mbdpay({
      app_id: process.env['app_id'],
      app_key: process.env['app_key']
    })
    console.log(mbdPay.app_id)
    console.log(mbdPay.app_key)
    
    const aliPay = async () => {
      const r = await mbdPay.alipay({
        url: 'http://somewhere.com', description: 'test', amount_total: 1
      })
      console.log(r, 'alipay')
    }
    const query = async () => {
      const r = await mbdPay.query({
        out_trade_no: 'xxx'
      })
      console.log(r, 'query')
    }
    
    const wechatH5 = async () => {
      const r = await mbdPay.wechatH5({
        description: "test", amount_total: 1
      })
      console.log(r, 'wechatH5')
    }
    
    const wechatJSAPI = async () => {
      const r = await mbdPay.wechatJSAPI({
        openid: "xxx",
        callback_url: "https://somewhere.com",
        description: "test", amount_total: 1
      })
      console.log(r, 'wechatJSAPI')
    }

    Keywords

    Install

    npm i @leekafai/mbd-pay

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    35.5 kB

    Total Files

    45

    Last publish

    Collaborators

    • leekafai