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

@chuxingpay/yisheng

v2.0.7

Published

易生支付,Node.js版本的SDK

Downloads

2

Readme

YiSheng Payment SDK

易生支付 SDK

YiSheng Office Docs

Notes

  1. 将易生提供的key,按照 rsa private key 格式排好,eg:

       -----BEGIN RSA PRIVATE KEY-----
       MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAIqUuxd92eEBXVne
       DWhfNP6XCkLcGBO1YAulexKX+OdlfZzB/4NNHkOAQQy84k3ZgIUPIk5hewLbA+XG
       rk9Wih5HG3ZQeFugeoTcx3vwo7AQv7KnmcKEWFNlOr/EhB3JndmcQnBRsIRRdCP+
       7nobfBqU0jS8dnpcQX1AtBRZRnkfAgMBAAECgYAe+u70ansZ1Q9EduKycY5MWAHA
       PqnXRhXppJ3l4zmOqV6ye6Aef1ADsRlZuqQw2S3lESQPN7WjRskRRiBTtjn8Atul
       9YeC7+QirP1K8seUP5gKB4bcjlzzl1m5dmxldkptJAmdzwYn8PRTW0+tFVyEaD/B
       8hKGxij4Gew0e8bwCQJBAOboG3ttBESsG2cAtmP1MfKRTjVdY7qRMXzBybcAeobB
       bmgCQgybVXXgjbGai+qwrQqcVRIp6p1yDWTZxVSuDWsCQQCZpBhcayOCMZR6F8dQ
       JSuSSSIJw/GGN7IXfMYIqLxA2oGzlQ0B1DffOUe2wrid+WdpLuYCz2LYPQHDEgYM
       1dwdAkEAnfwhEYm9ad73wLnUEQAqdHTGtex316aP3XQZt4Q0UQ73o2IoHsgI6OYD
       DIlZQfIv8xqTeiIDzEXEtEPrp8yOkQJBAIWAzFZKFqHD2UO6M8vVcKX9fGFF7TH2
       ZX75Qc82Z9ZmyDs2sgW71QzX5hPN4cQLeqswQFeCw14orMZHfBBdKJUCQQDiWYk8
       5okRugsWtxeJFhMEt2oUT+Kd8Yz5Aiz3J9XIS+zWtJrFlv+hXkVedPJ3xtBF32DZ
       rCbxDn3UjXipRaCP
       -----END RSA PRIVATE KEY-----

    然后执行 openssl rsa -in private.pem -out private.pem 进行转换为 Nodejs crypto 识别的格式

  2. 将 private.pem 作为 config.priKey

Install

$ npm i @chuxingpay/yisheng

Configuration

{
  "priKey": "String, private key base64 format",
  "partner": "Number, yisheng partner code",
  "urls": {
    "pay": "URL, yisheng payment url",
    "query": "URL, yisheng query order url"
  }     
}

Example

const config = {
    priKey: 'LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlDWGdJQkFBS0JnUUNLbExzWGZkbmhBVjFaM2cxb1h6VCtsd3BDM0JnVHRXQUxwWHNTbC9qblpYMmN3ZitEClRSNURnRUVNdk9KTjJZQ0ZEeUpPWVhzQzJ3UGx4cTVQVm9vZVJ4dDJVSGhib0hxRTNNZDc4S093RUwreXA1bkMKaEZoVFpUcS94SVFkeVozWm5FSndVYkNFVVhRai91NTZHM3dhbE5JMHZIWjZYRUY5UUxRVVdVWjVId0lEQVFBQgpBb0dBSHZydTlHcDdHZFVQUkhiaXNuR09URmdCd0Q2cDEwWVY2YVNkNWVNNWpxbGVzbnVnSG45UUE3RVpXYnFrCk1Oa3Q1UkVrRHplMW8wYkpFVVlnVTdZNS9BTGJwZldIZ3Uva0lxejlTdkxIbEQrWUNnZUczSTVjODVkWnVYWnMKWlhaS2JTUUpuYzhHSi9EMFUxdFByUlZjaEdnL3dmSVNoc1lvK0Juc05Idkc4QWtDUVFEbTZCdDdiUVJFckJ0bgpBTFpqOVRIeWtVNDFYV082a1RGOHdjbTNBSHFHd1c1b0FrSU1tMVYxNEkyeG1vdnFzSzBLbkZVU0tlcWRjZzFrCjJjVlVyZzFyQWtFQW1hUVlYR3NqZ2pHVWVoZkhVQ1Vya2traUNjUHhoamV5RjN6R0NLaThRTnFCczVVTkFkUTMKM3psSHRzSzRuZmxuYVM3bUFzOWkyRDBCd3hJR0ROWGNIUUpCQUozOElSR0p2V25lOThDNTFCRUFLblIweHJYcwpkOWVtajkxMEdiZUVORkVPOTZOaUtCN0lDT2ptQXd5SldVSHlML01hazNvaUE4eEZ4TFJENjZmTWpwRUNRUUNGCmdNeFdTaGFodzlsRHVqUEwxWENsL1h4aFJlMHg5bVYrK1VIUE5tZldac2c3TnJJRnU5VU0xK1lUemVIRUMzcXIKTUVCWGdzTmVLS3pHUjN3UVhTaVZBa0VBNGxtSlBPYUpFYm9MRnJjWGlSWVRCTGRxRkUvaW5mR00rUUlzOXlmVgp5RXZzMXJTYXhaYi9vVjVGWG5UeWQ4YlFSZDlnMmF3bThRNTkxSTE0cVVXZ2p3PT0KLS0tLS1FTkQgUlNBIFBSSVZBVEUgS0VZLS0tLS0K',
    partner: 900029000000354,
    urls: {
      // pay: 'https://test_nucc.bhecard.com:9088/api_gateway.do',
      // query: 'https://test_nucc.bhecard.com:9088/api_gateway.do'
      pay: 'http://yisheng.proxy.chuxingpay.com',
      query: 'http://yisheng.proxy.chuxingpay.com'
    },
    merchantId: '900029000000354',
    accType: '2'
}

const yisheng = new YiShengSDK(config)

const params = {
  "amount": "100",
  "out_trade_no": `${Date.now()}`,
  "acc": "4392260802157617",
  "name": "张四"
}

const result = await yisheng.pay(params)

License

MIT