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

@cubi/unionpay

v0.0.3-alpha.0

Published

The unionpay module for cubi framework

Downloads

16

Readme

UNIONPAY-银联支付开发包

描述

"酷比"(CUBI)体系中的,银联支付模块

安装

npm install @cubi/unionpay

使用

import { Unionpay } from '@cubi/unionpay';
const unionpay = new Unionpay({...});
...
const res = await unionpay.preAuthBack({...});
...

实现方法

| 功能 | 方法名 | 描述 | | -------------------- | ------------------- | -------- | | 银联侧开通在线支付 | openCardFront | | | 商户侧开通在线支付 | openCardBack | | | 在线支付开通查询 | openCardQueryBack | | | 开通短信 | openSMS | | | 消费短信 | consumeSMSCode | | | 银联侧实名认证 | realAuthFront | | | 商户侧实名认证 | realAuthBack | 暂未开通 | | 商户侧消费 | consumeBack | | | 银联侧开通并支付 | openAndConsumeFront | | | 商户侧分期 | installBack | | | 商户侧消费撤销 | consumeUndoBack | | | 商户侧交易结果查询 | tradeQueryBack | | | 商户侧预授权 | preAuthBack | | | 商户侧预授权撤销 | preAuthUndo | | | 商户侧预授权完成 | preAuthFinish | | | 商户侧预授权完成撤销 | preAuthFinishUndo | | | 商户侧退款 | refundBack | 暂未调试 |

银联商户测试卡

| 卡号 | 卡性质 | 机构名称 | 手机号 | 密码 | cvn2 | 有效期 | 证件号 | 姓名 | | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | | 6216261000000000018 | 借记卡 | 平安银行 | 13552535506 | | | | 341126197709218366 | 全渠道 | | 6221558812340000 | 贷记卡 | 平安银行 | 13552535506 | 123456 | 123 | 1123 | 341126197709218366 | 互联网 | | 6226090000000048 | 借记卡 | 招商银行 | 18100000000 | 111101 | | | 510265790128303 |张三| | 6226388000000095 | 贷记卡 | 华夏银行 | 18100000000 | | 248 | 1219 | 510265790128303 |张三| | 5200831111111113 | 贷记卡 | 农行贷 | 13552535506 | | 123 | 1119 | 5200831111111113 |全渠道| | 6221558812340013 | 贷记卡 | 平安 | 13552535506 | | 123 | 1123 | 341126197709218366 |全渠道|

测试卡号信息:短信验证码请输入6个1(例:111111) 商户号码777290058119210仅做为测试调通交易使用,该商户号配置了需要对敏感信息加密

关于通知

5.1.0接口前台类交易仅对成功交易发后台通知。

5.1.0接口后台交易对成功和失败都会发后台通知。

银联证书提取

银联提供的证书格式为.pfx,需要自行提取rsa格式的签名私钥。

openssl pkcs12 -in acp_test_sign.pfx -nodes -nocerts | openssl rsa -out acp_test_sign.pem