0.3.3 • Published 10 years ago

huifu v0.3.3

Weekly downloads
4
License
ISC
Repository
github
Last release
10 years ago

汇付天下P2P系统托管API文档

Build Status via Travis CI Coverage Status NPM version

注意:API约定

  • 所有接口调用遵循CmdId值,首字母小写,参数按照文档.其中参数Version,CmdId,MerCustId,ChkValue这四个参数不用填写
  • 所有接口调用均支持callback 和 promise

usage

var HUIFU = require('huifu');
var huifu = new HUIFU({
    merId: '', //商户号
    npcServerIp: '', //npc服务地址
    npcServerPort: '' , //npc服务端口
    merCustId: '', //汇付商户客户号
    platformUrl: '', //汇付服务器地址
    loadingHtml: '<div>loading</div>', //浏览器跳转时的提示html
    timeout: 60000, //http请求超时时间,默认60秒
    debug: true //打印函数调用的参数,默认是fasle
});

//用户开户接口
// promise
huifu.userRegister({UsrMp: '', UsrName:'', IdNo: '', BgRetUrl: '', RetUrl: '', PageType: '2'})
    .then(function (redirectUrl) {
        console.log('redirectUrl', redirectUrl)
    })
    .catch(function (error) {

    })

// callback
huifu.userRegister({UsrMp: '', UsrName:'', IdNo: '', BgRetUrl: '', RetUrl: '', PageType: '2'}, function (err, redirectUrl) {
    console.log('===========', err, redirectUrl);
});

API

用户管理类接口

交易类接口

查询类接口

其他接口

  • getConfig
  • queryRetQuota 获取终止异步回调的响应内容(参数是汇付接口返回的object)
  • reactResponse 4.2.7 异步回调验证签名的方法
  • isSuccess 判断汇付响应结果是否成功(返回boolean值)
  • log 控制台输入log接口(当且仅当实例化的参数debug:true时有效)

test

  • npm test
  • npm run cov
0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago