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

@vonpay/test-cards

v0.1.1

Published

Canonical test card → outcome map. Single source of truth for the sandbox iframe (vora.js) and the server-side mock binder (vonpay-checkout). Importing this package keeps the test-card allowlist + outcome mapping in lock-step across both sides of the embe

Readme

@vonpay/test-cards

Canonical test card → outcome map for sandbox-embedded testing.

Internal workspace package. Not published to npm. Consumed by:

  • @vonpay/vora-js — the sandbox iframe served at js.vonpay.com/v1/sandbox-iframe.html uses the allowlist to validate buyer-typed card numbers, and the outcome encoding to mint synthetic vp_pmt_test_* tokens.
  • vonpay-checkout — the server-side mock binder uses decodeOutcome to read intent from the token prefix and emit the correct payment_intent.succeeded / .failed / .requires_action event with the documented decline reasons.

Both halves import from this package so the test-card allowlist + outcome mapping cannot drift.

Adding a new test card

  1. Add the entry to TEST_CARDS in src/index.ts.
  2. Update vonpay-docs/docs/reference/test-cards.md to document it (card number, brand, outcome, webhook event triggered).
  3. Bump this package's version.
  4. The shared constant flows automatically into both the iframe and the server-side binder on rebuild.

Why a shared package and not a hardcoded list in each repo

The iframe ships from js.vonpay.com (Cloudflare Worker + R2). The server-side binder ships from checkout.vonpay.com (Next.js on Vercel). If the two used independent lists, a card-number typo in either side would create a "field accepts but server rejects" or "field rejects but server would have accepted" divergence — silent dev-experience drift. Sharing the constants makes this class of bug a build error rather than a runtime mystery.

Safety locks

The allowlist is the load-bearing safety lock for the non-PCI sandbox iframe: real card numbers are NOT in the list, so even if a buyer typed one (against the iframe's UI guards), lookupTestCard() returns null and the mock never accepts a token mint based on real card data. Defense in depth — both the iframe-side validation AND the server-side token-mint endpoint check against the same list.