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

paymax

v1.0.4

Published

paymax-server-sdk-nodejs

Downloads

21

Readme

Paymax node.js sdk


简介

lib 文件夹下是 Node.js SDK 文件,
example 文件夹里面是一个简单的接入示例,该示例仅供参考。

版本要求

nodejs 版本 v0.10.0 及以上

安装

npm install paymax

初始化配置

var Paymax=require('paymax');
//Paymax提供给商户的SecretKey,登录网站后查看
Paymax.conf.setSecretKey('55970fdbbf10459f966a8e276afa86fa');

//Paymax提供给商户的公钥,登录网站后查看(参考样例,严格按照pem格式保存)
Paymax.conf.setPaymaxPublicKeyPath('paymax_rsa_public_key.pem');

//商户自己的私钥【公钥通过Paymax网站上传到Paymax,私钥pem文件路径设置到下面的变量中】
Paymax.conf.setPrivateKeyPath('rsa_private_key.pem');

下单:

Paymax.charge.createCharge(
    {
        amount: '0.01',
        subject: 'test_subject',
        body: 'this is a body',
        order_no: generateRandomAlphaNum(20),
        channel: 'alipay_app',
        client_ip: '127.0.0.1',
        app: 'app_7hqF2S6GYXET457i',
        currency: 'cny',
        extra: {},
        description: 'this is a description',
    }, getResult
)

订单查询

Paymax.charge.queryCharge('ch_fbe2d2675043004b02303b6a',getResult);

退款

Paymax.refund.createRefund(
        'ch_a59123a1538074f3cfa6568b',
         {
         'amount':'0.01',
         'description':'this is a description',
         'extra':{}
         },
         getResult
 );

退款查询

Paymax.refund.queryRefund(
         {
         'chargeNo':'ch_a59123a1538074f3cfa6568b',
         'refundNo':'re_d6586ff6e077b95985344538'
         }
        ,getResult
 );

人脸识别:查询用户识别信息

Paymax.face.queryFaceAuth('123',getResult);

详细信息请参考 API 文档