关于使用规则,请注意:
关于接口文档,请注意:
目录 |
查询付费套餐(1.0),具体如下:
接口调用请求说明
http请求方式: POST {WebPath}/api/Pay/SearchPayPackages
POST数据说明
POST数据示例如下:
{ userID:"10129580", type:0, payType:0 }
参数说明
参数 | 是否必须 | 说明 |
---|---|---|
userID | 是 | 当前登录用户ID |
type | 是 | 类型,0一卡通付费套餐,1短信套餐 |
payType | 是 | 付款类型,0正常购买,1升级 |
返回值说明
在调用接口后,会返回JSON数据包。正常时的返回JSON数据包示例:
{ "error": 0, "data": { "empName": "陈雅诺", "selectType": 0, "qrCode": "二维码地址", "photo": "http://oss.zjzdy.net/APP/20170719/d7d8218421b235327690657175e6a0e5.jpg", "cardNo": "335731330", "wxAccount": "", "alipayAccount": "", "unionPayAccount": "", "projectDescription":"", "items": [ { "id": "10000001", "itemName": "A套餐-不含定位", "itemPrice": "¥158元/年", "itemValue": 158, "description": "包含多监护人,进出校考勤,选课走班刷卡,答题卡,语音通话功能", "details": [ { "icon": "http://oss.zjzdy.net/APP/att.png", "title": "进出校考勤", "content": "每天上学到校、放学离校,都有及时的消息通知" }, { "icon": "http://oss.zjzdy.net/APP/clsAtt.png", "title": "教室考勤/选修课考勤", "content": "进出教室,选修课到课,近距离刷卡签到" }, { "icon": "http://oss.zjzdy.net/APP/FamilyPhone.png", "title": "校园情亲电话(壁挂式)", "content": "校园内亲情电话,与家长及时联系沟通" }, { "icon": "http://oss.zjzdy.net/APP/Answers.png", "title": "答题器功能", "content": "课堂答题,参与课堂互动" } ] }, { "id": "10000002", "itemName": "B套餐-含定位", "itemPrice": "¥188元/年", "itemValue": 188, "description": "包含多监护人,进出校考勤,选课走班刷卡,答题卡,语音通话,学生定位功能", "details": [ { "icon": "http://oss.zjzdy.net/APP/att.png", "title": "进出校考勤", "content": "每天上学到校、放学离校,都有及时的消息通知" }, { "icon": "http://oss.zjzdy.net/APP/clsAtt.png", "title": "教室考勤/选修课考勤", "content": "进出教室,选修课到课,近距离刷卡签到" }, { "icon": "http://oss.zjzdy.net/APP/FamilyPhone.png", "title": "校园情亲电话(壁挂式)", "content": "校园内亲情电话,与家长及时联系沟通" }, { "icon": "http://oss.zjzdy.net/APP/Answers.png", "title": "答题器功能", "content": "课堂答题,参与课堂互动" } ] } ] } }
返回字段说明
字段 | 类型 | 说明 | |||
---|---|---|---|---|---|
error | int | 返回值:'0'表示成功,'1'表示失败 | |||
message | string | 'error=1'时错误信息有值返回 | |||
data | empName | string | 支付人姓名 | ||
photo | string | 支付人头像 | |||
cardNo | string | 支付人卡号 | |||
selectType | int | 选择类型,0单选1多选 | |||
qrCode | string | 二维码地址 | |||
protocolUrl | string | 用户协议地址 | |||
wxAccount | string | 收款方微信账户 | |||
alipayAccount | string | 收款方支付宝账户 | |||
unionPayAccount | string | 收款方银联账户 | |||
projectDescription | string | 项目描述 | |||
items | id | string | 支付项ID | ||
itemName | string | 支付项名称 | |||
itemPrice | string | 支付项价格字符串 | |||
itemValue | decimal | 支付项金额 | |||
description | string | 支付项描述 | |||
details | icon | string | 图标 | ||
title | string | 标题 | |||
content | string | 内容 |
支付,具体如下:
接口调用请求说明
http请求方式: Post {WebPath}/api/Pay/PayMoney
Post数据说明
Post数据示例如下:
{ channel: "wx", subject: "智慧校园一卡通", body: "套餐B-带定位功能", amount: 0.01, userID: "10129580", empName: "陈雅诺", itemIDs: "10000002", type:0 }
参数说明
参数 | 是否必须 | 说明 |
---|---|---|
channel | 是 | 支付使用的第三方支付渠道 |
subject | 是 | 商品的标题 |
body | 是 | 商品的描述 |
amount | 是 | 订单总金额, 单位为对应币种的最小货币单位,例如:人民币为分(如订单总金额为 1 元,此处请填 100)。 |
userID | 是 | 用户ID。 |
empName | 是 | 姓名 |
itemIDs | 是 | 付款项ID,付款项多选的情况下,多个付款项ID之间用逗号“,”分隔 |
type | 是 | 类型,0正常购买,1升级,2续费 |
返回字段说明
成功: { "error":0, "data":{ "recordIDs":"10000001", "chargeData":{ "error":0, "charge":{ "id":"ch_9Ka1a5Ta5yj9efHmjPrfvH08", "object":"charge", "created":1470976321, "livemode":false, "paid":false, "refunded":false, "app":"app_DKWLKKDu9eLODmnv", "channel":"alipay_wap", "order_no":"1234567896", "client_ip":"127.0.0.1", "amount":1, "amount_settle":1, "currency":"cny", "subject":"短信支付", "body":"一年的短信费用", "extra":{ "success_url":"http://pay.zjzdy.net/api/charges/success", "cancel_url":"http://pay.zjzdy.net/api/charges/cancel" }, "time_paid":null, "time_expire":1471062721, "time_settle":null, "transaction_no":null, "refunds":{ "object":"list", "url":"/v1/charges/ch_9Ka1a5Ta5yj9efHmjPrfvH08/refunds", "has_more":false, "data":[ ] }, "amount_refunded":0, "failure_code":null, "failure_msg":null, "metadata":{ }, "credential":{ "object":"credential", "alipay_wap":{ "channel_url":"https://mapi.alipay.com/gateway.do", "_input_charset":"utf-8", "body":"一年的短信费用", "it_b_pay":"2016-08-13 12:32:01", "notify_url":"https%3A%2F%2Fapi.pingxx.com%2Fnotify%2Fcharges%2Fch_9Ka1a5Ta5yj9efHmjPrfvH08", "out_trade_no":"1234567896", "partner":"2008808933961979", "payment_type":"1", "return_url":"http%3A%2F%2Fpay.zjzdy.net%2Fapi%2Fcharges%2Fsuccess", "seller_id":"2008808933961979", "service":"alipay.wap.create.direct.pay.by.user", "subject":"短信支付", "total_fee":"0.01", "sign":"q2oEnkJxdmYRUfCkSPDRq279VZpXrno0iGVHT9Cf1mPoNAEUrRvXHIYJK5ap1D+gV8L/73VDBeX7DbLKS598Yv6gFKcBocI3hK+aZ2yrW5yo+lA7rfjbDSMHZAcqxU2LFTT2feoyoCqWw/pfmRWghrgv/JTYPCih2ZA7y7vsgak=", "sign_type":"RSA" } }, "description":null } } } }
字段 | 类型 | 说明 | |||
---|---|---|---|---|---|
error | int | 返回值:'0'表示成功,'1'表示失败 | |||
message | string | error=1 返回错误信息 | |||
data | recordIDs | string | 付款记录ID | ||
chargeData | string | ping++服务器返回的支付凭据,具体结构参考ping++开发者文档 |
获取付款成功信息,具体如下:
接口调用请求说明
http请求方式: Post {WebPath}/api/Pay/SearchSuccessData
Post数据说明
Post数据示例如下:
{ userID:"10129580", orderNumber:"123456789" }
参数说明
参数 | 是否必须 | 说明 |
---|---|---|
ids | 是 | 付款记录ID,多个ID之间逗号分隔 |
返回字段说明
成功: { "error":0 }
字段 | 类型 | 说明 | |||
---|---|---|---|---|---|
error | int | 返回值:'0'表示成功,'1'表示失败 | |||
message | string | error=1 返回错误信息 | |||
data | projectName | string | 项目名称 | ||
itemName | string | 套餐名称 | |||
payStartDate | string | 生效开始时间 | |||
payEndDate | string | 到期时间 | |||
empName | string | 姓名 | |||
imei | string | 智慧校园卡卡号 | |||
sim | string | sim卡卡号 | |||
gradeName | string | 年级名称 | |||
className | string | 班级名称 | |||
mobile | string | 开通短信套餐的手机号 |