Catalog npm
PACKAGE EXPLORERView in registry

3rd-party-pay

npm

> import { wxpay, alipay } from "3rd-party-pay";

alipaytypescriptwxpay微信支付支付宝
Versions collected9
Direct dependencies14From release 0.0.9
Last observed20 Oct, 19:51 UTC

README

Current package documentation

3rd-party-pay

import { wxpay, alipay } from "3rd-party-pay";

微信支付文档

wxpay.WxPayStatic.config({
  //沙箱
  sandbox: false,
  //微信支付host
  host: "",
  //沙箱host
  sandboxHost: "",
  //记录请求
  requestLog: log => {
    console.log("wx", log);
  }
});

let wxpayInst = new wxpay.WxPay({
  mch_id: "商户号",
  key: "密钥",
  appid: "公众账号ID",
  pfxPath: "证书路径"
});

//统一下单
wxpayInst.unifiedOrder({
  body: "test",
  out_trade_no: "单号",
  total_fee: 1, //金额
  spbill_create_ip: "127.0.0.1",
  trade_type: wxpay.TradeType.Native,
  notify_url: "通知订单"
});

//查询订单
wxpayInst.orderQuery({ out_trade_no: "单号", transaction_id: "wx单号" });

阿里支付文档
秘钥使用 PKCS8(JAVA适用) 格式

alipay.AliPayStatic.config({
  sandbox: true,
  host: "",
  sandboxHost: "",
  sign_type: "RSA2",
  requestLog: log => {
    console.log("ali", log);
  }
});

let alipayInst = new alipay.AliPay({
  app_id: "应用ID",
  notify_url: "通知地址",
  rsaPrivatePath: "rsa私钥",
  rsaPublicPath: "rsa公钥"
});

let url = alipayInst.pagePay(
  {
    out_trade_no: "单号",
    subject: "测试",
    total_amount: 0.01,
    body: "测试",
    timeout_express: "30m"
  },
  {
    notify_url: "通知地址"
  }
);
//浏览器上打开url扫码支付

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 9

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.9Registry latest10 Dec 201914
0.0.85 Dec 201914
0.0.723 Sept 201912
0.0.623 Sept 201912
0.0.56 Sept 201912
0.0.45 Sept 201912
0.0.322 Jul 201912
0.0.219 Jul 201912
0.0.119 Jul 201912

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
aoi-umi/3rd-party-pay

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:51 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:f2db1b89ed4cc239a20028935757aed15619608c4ccd17c26c41264aabff5602