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

colawallexpay

v0.0.7

Published

集成ColawallexPay支付库

Downloads

4

Readme

ColawallexPay

本库集成 ColawallexPay 支付库.

有关如何开始以及如何使用 ColawallexPay 的信息,请参阅 ColawallexPay.

安装

Script 标签链接引入
<script src="https://wallexpay.oss-cn-hangzhou.aliyuncs.com/public/colawallexpay.min.js"></script>
Node

使用 npm 前请保障 Node 安装完成.

npm install colawallexpay

使用

Webpack / Browserify / Babel 需要引入
import ColawallexPay from "colawallexpay";
使用函数
// 假设这是你从后端接口获取的参数
const param = {
  casher_link: "", // 支付跳转链接(可选),如果有这个链接,ColawallexPay 支付函数将直接跳转;如果没有,则生成表单让用户填写。
  gateway: "", // 用户填写表单提交的 action(必填)。
  data: "", // 支付数据(必填),通常是一个包含支付信息的字符串或对象。
  payment_id: "", // 系统订单号(必填),用于标识和跟踪支付订单。
  // 其他可能需要的参数...
};

// 构建 ColawallexPay 实例
const xxx = new ColawallexPay({
  // 从接口传递回来的参数
  ...param,
  // 自定义事件处理函数(后期会开发更多)
  onErr: function (code, msg) {
    console.log(code + "发生错误:", msg); // 打印错误信息到控制台
    /**
     * code为错误码错误码类型有
     * LACK_PARAM:参数缺失
     */
    // 这里可以添加更多的错误处理逻辑,如提示用户或重试等。
  },
  // 可以在这里添加其他配置选项和自定义事件处理函数...
});

// 执行 ColawallexPay 支付函数 V1 版本
xxx.createFormPayment_v1();

注意事项

  • 确保你使用的是官方发布的最新版本。如果你通过 npm 或其他包管理器下载的不是最新版本,请确认你使用的源是否是官方的。你可以通过运行 npm view colawallexpay version 命令来检查当前安装的版本。