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 🙏

© 2026 – Pkg Stats / Ryan Hefner

geovis-payment-sdk

v1.1.11

Published

这是一个统一支付工具函数库

Downloads

143

Readme

这是一个统一支付工具函数库

安装

pnpm install geovis-payment-sdk --save

使用

import { openPaymentDialog, openPaymentPage } from "geovis-payment-sdk";
// 打开支付弹窗
openPaymentDialog(
  {
    originUrl: "https://payment.geovisearth.com", // 环境 (非必填); 类型:字符串; 默认值:https://payment.geovisearth.com; 可选值:开发:https://payment.geovisearth.com;测试环境:https://payment.geovisearth.com;生产环境: https://payment.geovisearth.com
    userToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...... ", // 通过sso获取的用户token (必填); 类型:字符串
    orderNumber: "orderNumber", // 创建订单接口返回的订单编号 (必填); 类型:字符串
    orderDetailUrl: "https://xxxxxx/orderDetail", // 订单详情页 (必填); 类型:字符串; 说明:统一收银台中有返回订单的按钮,点击按钮就可以跳转至订单详情页
    openPaymentPageMode: "_blank", // 打开支付页面的方式 (非必填); 类型:字符串 可选值:"_blank" | "_self"  默认值:"_blank"
    openOrderDetailPageMode: "_blank", // 打开订单详情页的方式 (非必填); 类型:字符串 可选值:"_blank" | "_self"  默认值:"_blank"
  },
  (code: string) => {
    // 点击右上角关闭按钮的回调函数 (非必填); 类型:函数; 说明:code为关闭按钮的状态,值为"close"
    switch (code) {
      case "ORDER_PAYED_CLOSE":
        console.log("订单已支付时,用户点击关闭按钮");
        break;
      case "ORDER_NOPAY_CLOSE":
        console.log("订单未支付时,用户点击关闭按钮");
        break;
      case "PAY_MODE_TO_PUBLIC":
        console.log("用户切换至对公转账");
        break;
      case "PAY_MODE_TO_PUBLIC_CLOSE":
        console.log("用户切换至对公转账后,用户点击关闭按钮");
        break;
    }
  }
);

// 打开支付页面
openPaymentPage(
  {
    originUrl: "https://payment.geovisearth.com", // 环境 (非必填); 类型:字符串; 默认值:https://payment.geovisearth.com; 可选值:开发:https://payment.geovisearth.com;测试环境:https://payment.geovisearth.com;生产环境: https://payment.geovisearth.com
    userToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...... ", // 通过sso获取的用户token (必填); 类型:字符串
    orderNumber: "orderNumber", // 创建订单接口返回的订单编号 (必填); 类型:字符串
    orderDetailUrl: "https://xxxxxx/orderDetail", // 订单详情页 (必填); 类型:字符串 ,说明:统一收银台中有返回订单的按钮,点击按钮就可以跳转至订单详情页
    openOrderDetailPageMode: "_blank", // 打开订单详情页的方式 (非必填); 类型:字符串 可选值:"_blank" | "_self"  默认值:"_blank"
  },
  (code: string) => {
    // 预留回调函数 (非必填); 类型:函数; 说明:code状态,值类型string
    switch (code) {
      case "xxxx":
        console.log("xxxxxx");
        break;
    }
  }
);