npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wxpay-types

v3.1.0

Published

微信支付接口类型定义

Downloads

9

Readme

wxpay-types

Nodejs 微信支付 Typescript 类型大全, 一比一还原微信支付文档接口请求、响应类型,字段类型以及字段说明,助力Nodejs下的微信支付开发

Install

pnpm add wxpay-types

Import

import { jsapi, weapp } from "wxpay-types";
// or
import * as WXPayTypes from 'wxpay-types'

支持的产品

| 产品名 | 类型名 | 支持情况 | | :----: | :----: | :----: | | JSAPI支付 | jsapi | 支持 | | APP支付 | - | - | | H5支付 | - | - | | Native支付 | - | - | | 小程序支付 | weapp | 支持 | | 合单支付 | - | - | | 资金/交易账单 | - | - | | 退款 | - | - |

File Content

export type CommReqAmountInfo = {
  /** 【总金额】 订单总金额,单位为分。 */
  total: number;
  /** 【货币类型】 CNY:人民币,境内商户号仅支持人民币。 */
  currency?: string;
};
export type JsapiReqPayerInfo = {
  /** 【用户标识】 用户在普通商户AppID下的唯一标识。 下单前需获取到用户的OpenID,详见OpenID获取 */
  openid: string;
};
export type OrderDetail = {
  /** 【订单原价】 1、商户侧一张小票订单可能被分多次支付,订单原价用于记录整张小票的交易金额。2、当订单原价与支付金额不相等,则不享受优惠。3、该字段主要用于防止同一张小票分多次支付,以享受多次优惠的情况,正常支付订单不必上传此参数。 */
  cost_price?: number;
  /** 【商品小票ID】 商家小票ID */
  invoice_id?: string;
  /** 【单品列表】 单品列表信息条目个数限制:【1,6000】 */
  goods_detail: GoodsDetail[];
  /** 【商户侧商品编码】 由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */
  merchant_goods_id: string;
  /** 【微信支付商品编码】 微信支付定义的统一商品编号(没有可不传) */
  wechatpay_goods_id?: string;
  /** 【商品名称】 商品的实际名称 */
  goods_name?: string;
  /** 【商品数量】 用户购买的数量 */
  quantity: number;
  /** 【商品单价】 单位为:分。如果商户有优惠,需传输商户优惠后的单价(例如:用户对一笔100元的订单使用了商场发的纸质优惠券100-50,则活动商品的单价应为原单价-50) */
  unit_price: number;
};
export type GoodsDetail = {
  /** 【商户侧商品编码】 由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */
  merchant_goods_id: string;
  /** 【微信支付商品编码】 微信支付定义的统一商品编号(没有可不传) */
  wechatpay_goods_id?: string;
  /** 【商品名称】 商品的实际名称 */
  goods_name?: string;
  /** 【商品数量】 用户购买的数量 */
  quantity: number;
  /** 【商品单价】 单位为:分。如果商户有优惠,需传输商户优惠后的单价(例如:用户对一笔100元的订单使用了商场发的纸质优惠券100-50,则活动商品的单价应为原单价-50) */
  unit_price: number;
};
export type CommReqSceneInfo = {
  /** 【用户终端IP】 用户的客户端IP,支持IPv4和IPv6两种格式的IP地址。 */
  payer_client_ip: string;
  /** 【商户端设备号】 商户端设备号(门店号或收银设备ID)。 */
  device_id?: string;
  /** 【商户门店信息】 商户门店信息 */
  store_info?: StoreInfo;
  /** 【门店编号】 商户侧门店编号 */
  id: string;
  /** 【门店名称】 商户侧门店名称 */
  name?: string;
  /** 【地区编码】 地区编码,详细请见省市区编号对照表。 */
  area_code?: string;
  /** 【详细地址】 详细的商户门店地址 */
  address?: string;
};

查看更多