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

egoal-ticket-api

v1.4.0

Published

node api module for shenzhen egoal ticket system

Downloads

3

Readme

深圳易高科技票务系统API模块

安装模块

npm install egoal-ticket-api

参数配置

var config = {
    "uname":"客户名",
    "pass": "客户密码MD5加密32位字符串",
    "url":  "接口地址"
}

实例化对象

var egoal = require('egoal-ticket-api');

var ticket = new egoal(config);

获取产品接口

ticket.orderGetPdcId(function(err, result){
    console.log(err || result);
});

门票购买接口

ticket.orderCreate({
    threeOrderId: '你的订单编号',
    playDate:     '2016-12-31',
    mobile:       '手机号',
    pdcId:        '产品1编号|产品2编号|产品3编号',
    pdcPrice:     '产品1价格|产品2价格|产品3价格',                  //以“分”为单位的价格
    pCount:       '产品1数量|产品2数量|产品3数量',
    checkNum:     '产品1次数|产品2次数|产品3次数',                                           //每张票的可检票次数
    certNo:       '客户1身份证号码|客户2身份证号码|客户3身份证号码',   //可选,可以为空
    money:        '订单总金额',                                   //以“分”为单位的总价  
    localPay:     '0|1'                                         // 可现场支付填“1”
}, function(err, result){
    console.log(err || result);
});

订单(门票)状态接口

ticket.orderGetInfo('你自己系统的订单编号', function(err, result){
    console.log(err || result);
});

ticket.orderGetInfo({
    threeOrderId:"你自己系统的订单编号"
}, function(err, result){
    console.log(err || result);
});

ticket.orderGetInfo({
    threeOrderId:"你自己系统的订单编号",
    orderId: "易高系统订单编号",
    ticketCode:"票号"
}, function(err, result){
    console.log(err || result);
});

订单退订接口

ticket.orderCancel({
    orderId:        "易高系统订单编号",
    threeOrderId:   "你自己系统的订单编号",
    ticketCode:     "票号"
}, function(err, result){
    console.log(err || result);
});

消费通知接口

ticket.ticketNotice(req, res, function(result){
    console.log(result);
    return res.json({status:1, message:'receive success.'});
});

消费通知接口(Express示例)

router.post('/notify', function(req, res, next){
    var data = req.body;
    // ticketNotice方法将对请求参数做校验
    ticket.ticketNotice(data, function(err, result){
        if(err) return res.json({code:0, message:err.message});
        return res.json({code:1, message:"success"});
    });
});

相关链接

易高官方网站
易高官方文档(官方V2.1PDF手册)
Issues列表
[版权声明]:本模块由丽江云创信息技术有限公司提供,并由Mengkeys负责维护。