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 🙏

© 2025 – Pkg Stats / Ryan Hefner

alipay-cloud-sdk-test

v1.17.0

Published

Alipay Cloud SDK for Test

Downloads

65

Readme

Alipay Cloud SDK

Serverless 云端调用 - 支付宝开放平台

Installation 安装

npm install alipay-cloud-sdk --save
npm install @alicloud/mpserverless-sdk --save

alipay-cloud-sdk 依赖 @alicloud/mpserverless-sdk,使用时需要传入 mpserverless-sdk 实例进行初始化

Usage 使用示例

// 1. 引入必要的 sdk
import MiniProgram from '@alicloud/mpserverless-sdk';
import cloud from 'alipay-cloud-sdk';

// 2. 在 app.js 中对 sdk 进行初始化
// 2.1 初始化 mpserverless
const mpserverless = new MiniProgram(my, {
  // 参数能在小程序云服务空间详情中获取
  appId: '',
  spaceId: '',
  endpoint: '',
  clientSecret: '',
});
// 2.3 初始化 alipay-cloud-sdk
cloud.init(mpserverless, {});

// 3. 在想要使用的页面导入 alipay-cloud-sdk 即可使用
// 比如在 page.js
import cloud from 'alipay-cloud-sdk';

cloud.base.createQrcode(urlParam, queryParam, describe);

API 接口列表

cloud.init() 初始化

cloud.init(mpserverless, {
  // 配置此参数后,拥有回调消息的 openapi 将回调该地址
  notify: {
    url: 'https://callback',
  },
})

cloud.aliyun 阿里云能力

短信

cloud.aliyun.sendSms(phoneNumbers: string, signName: string, templateCode: string)
cloud.aliyun.sendBatchSms(phoneNumberJson: object, signNameJson: object, templateCode: string, templateParamJson: object)
cloud.aliyun.querySms(phoneNumber: string, sendDate: string, pageSize: number, currentPage: number)
cloud.aliyun.querySmsWithBizId(phoneNumber: string, sendDate: string, pageSize: number, currentPage: number, bizId: string)

cloud.base 通用基础能力

用户授权

cloud.base.getOAuthToken(code: string)
cloud.base.getOAuthTokenWithAuthCode(code: string)
cloud.base.getOAuthTokenWithRefreshToken(refreshToken: string)

小程序二维码

cloud.base.createQrcode(urlParam: string, queryParam: string, describe: string)

cloud.fund 资金能力

授权

cloud.fund.freezeAuth(outOrderNo: string, outRequestNo: string, orderTitle: string, amount: string, payeeUserId: string)
cloud.fund.unfreezeAuth(authNo: string, outRequestNo: string, amount: string, remark: string)
cloud.fund.payTrade(subject: string, outTradeNo: string, totalAmount: string, authCode: string)
cloud.fund.cancelAuth(authNo: string, outOrderNo: string, outRequestNo: string, remark: string)
cloud.fund.queryAuth(authNo: string, outOrderNo: string, outRequestNo: string)

转账

cloud.fund.transfer(outBizNo: string, transAmount: string, productCode: string, orderTitle: string, payee_Info: Participant)
cloud.fund.queryTransfer(productCode: string, payFundOrderId: string)
cloud.fund.queryAccount(alipayUserId: string)

红包

cloud.fund.redpacketTransfer(params: object)

cloud.marketing 营销能力

小程序模板消息

cloud.marketing.sendTemplateMessage(toUserId: string, formId: string, userTemplateId: string, page: string, data: string)

cloud.member 会员能力

支付宝身份认证

cloud.member.initializeUserCertify(outerOrderNo: string, bizCode: string, identityParam: UserCertifyParam, merchantConfig: UserCertifyMerchantConfig)
cloud.member.userCertify(certifyId: string)
cloud.member.queryUserCertify(certifyId: string)

cloud.payment 支付能力

通用能力

cloud.payment.createTrade(subject: string, outTradeNo: string, totalAmount: string, buyerId: string)
cloud.payment.queryTrade(tradeNo: string)
cloud.payment.refundTrade(outTradeNo: string, refundAmount: string, outRequestNo: string,  refundReason: string)
// cloud.payment.closeTrade()
// cloud.payment.cancelTrade()

花呗分期

cloud.payment.createHuabeiTrade(subject: string, outTradeNo: string, totalAmount: string, buyerId: string, huabeiConfig: HuabeiConfig)

当面付

// cloud.payment.payFaceToFaceTrade()

cloud.security 安全能力

文本风险识别

cloud.security.detectRiskContent(content: string);

Contribute 共建