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

pb-pay-u

v0.7.11

Published

- 安装依赖

Readme

开发

  • 安装依赖

     yarn install
  • 找一个待支付的订单id (日常环境)

    app.tsx文件中 更新 orderId

    yarn run dev

    注意⚠️: 需要保持当前开发环境是登录状态

使用方法

基础使用

import Pay from '@tuya-fe/common-pay'

return <Pay orderId={'xxx'} successBackUrl={'xxx'} />

props 说明

| key | 类型 | 是否可选 | 值 | | --------------- | -------- | -------- | ----------------------------------------------------------------------------------- | | orderId | string | 是 | orderId、orderIdMaster、mergeId 三选一 | | orderIdMaster | string | 是 | orderId、orderIdMaster、mergeId 三选一 | | mergeId | string | 是 | orderId、orderIdMaster、mergeId 三选一,传入 mergeId 后,orderDetail 需要自己拼出来 | | bankList | string | 是 | (组件中会自己在客户端请求, 可手动插入支持服务端渲染) | | type | array | 是 | ['bank', 'ali', 'weChat', 'paypal', 'offline', 'balance', 'stripe'] | | lang | enum | 是 | 'zh', 'en' | | successBackUrl | string | 否 | 在 stripe 支付时必须传全长绝对的 url | | aliPayParams | object | 是 | 支付宝额外参数,可能根据项目不同 | | bankPayParams | object | 是 | 银行支付额外参数,可能根据项目不同 | | extraClass | string | 是 | 额外样式 | | offlineExtra | any | 是 | 线下支付额外组件 | | rechargeUrl | string | 是 | 余额不足支付链接 | | username | string | 是 | 用户名 | | isRecharge | boolean | 是 | 是否充值余额,为 true 的情况下隐藏余额支付 tab | | onTabClick | function | 是 | tab 被点击的回调 function(key: string, event: MouseEvent) | | showOfflineTips | boolean | 是 | 控制线下汇款 tab 中的重要提示的显示隐藏,默认为true,显示文案 |

支付回调 url 说明

  • 微信,银行(连连),余额,paypal,这四种支付方式的回调链接由 successBackUrl 控制
  • 支付宝回调域名+path 由服务端配置,query 由组件传入 aliPayParams 控制

如果项目需要用单独的支付接口或其他接口,支持传入方式复写,需保证返回格式与组件内一直,具体看组件代码。

开发

用 node 10 build