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

keel-module-alipay

v0.1.0

Published

支付宝支付 (Alipay payment) for Keel React Native apps.

Readme

keel-module-alipay

支付宝支付 (Alipay payment) for Keel apps. The second build-verified Keel vendor module — same SPM .binaryTarget recipe as keel-module-wechat.

pay() runs the Alipay cashier for a server-signed order string and resolves with { resultStatus, result, memo } (resultStatus === "9000" = success). Your server builds + signs orderInfo (alipay.trade.app.pay) with the merchant private key — the key never ships in the bundle.

| Platform | Upstream SDK | Symbol | |----------|--------------|--------| | iOS | AlipaySDK.xcframework — SPM .binaryTarget in Package.swift (Alipay's official CDN zip, pinned by checksum) | AlipaySDK | | Android | com.alipay.sdk:alipaysdk-android (maven) | PayTask.payV2 |

iOS delivery note: an SPM source target can't import a CocoaPods module, so the SDK is consumed as an SPM .binaryTarget (not ios.pods). The SDK's transitive system frameworks (WebKit/CoreTelephony/z/…) are declared as linkerSettings in Package.swift. The zip also ships an AlipaySDK.bundle (payment-UI assets) that a production app must embed as an app resource — not needed to build/link/launch.

Install

keel install keel-module-alipay

Keel autolinking wires both platforms on the next build (no manual Podfile/Gradle edits).

iOS one-time fetch: Alipay's xcframework lives behind an extension-less CDN url (so SPM binaryTarget(url:) can't take it), and its framework slices ship a broken Info.plist. So the SDK is vendored via binaryTarget(path:), populated by a fetch script (runs automatically on npm install's postinstall; run it manually if needed):

sh node_modules/keel-module-alipay/packaging/fetch-sdk.sh

Usage

import * as alipay from 'keel-module-alipay';

// orderString comes from YOUR server (signed with the merchant key).
const { resultStatus } = await alipay.pay({
  orderString,
  scheme: 'myapp', // iOS only — must match a CFBundleURLSchemes entry
});
if (resultStatus === '9000') { /* success — verify result on your server */ }

pay() does not reject on user cancel — check resultStatus ("6001" = cancel). It rejects only if the native module isn't linked or orderString is missing.

Host integration

iOS

  1. SDK — already wired via the SPM .binaryTarget in Package.swift.

  2. URL scheme — add your scheme (e.g. myapp) to CFBundleURLTypes, and pass it to pay({ scheme }).

  3. Route the return — when Alipay switches back to your app, the host AppDelegate/SceneDelegate forwards the URL to the module:

    import KeelModuleAlipay
    
    func scene(_ scene: UIScene, openURLContexts contexts: Set<UIOpenURLContext>) {
        if let url = contexts.first?.url, KeelModuleAlipay.handleOpen(url) { return }
        // … existing handling …
    }

Android

The SDK is pulled automatically (build.gradle.kts), and the trampoline KeelAlipayActivity is declared in this module's manifest — no host code.

Server side

Build + sign the order on your backend (alipay.trade.app.pay), return the orderInfo string, and verify the async/result signature there before fulfilling. Keep the merchant private key on the server.

License

Apache-2.0 — see LICENSE in the parent monorepo.