[关闭]
@a5635268 2018-04-26T14:30:47.000000Z 字数 3156 阅读 782

停车支付

接口文档


说明

  • 参数默认都是必传的,非必传的会有说明

  • 都是通过POST方式请求

  • 成功的status状态都为0

接口加密

  1. # 所有接口都要带上以下参数
  2. api_secret = md5(md5(json_encode(post)) + 'Zq9&W*a3xP3xxceg#Q9JCzI4d');

微信授权

采用跳转授权的方式

http://dev.mall.chamshare.cn/wap/Wap/Index/wxTransfer/uniacid/163?_url=http://www.baidu.com

_url显示的指定跳转的链接接着授权成功后回跳转回

https://www.baidu.com/?user_key=30af9e1dd2b96576c49bfd041955cd2d。以此得到user_key,该key的有效时间为30秒

api

http://dev.mallservice.chamshare.cn/park/Content/getToken

params

  1. {
  2. "user_key": "user_key——user_key", // 通过上面的链接获得
  3. }

response

  1. # success
  2. {
  3. "status": 0,
  4. "data": {
  5. 'token': '用户标识token'
  6. },
  7. "message": "调用成功"
  8. }

最近三辆车

api

http://dev.mallservice.chamshare.cn/park/Content/recentCar

params

  1. {
  2. "token": "token",
  3. }

response

  1. {
  2. "code": 0,
  3. "message": "调用成功",
  4. "data": {
  5. "count": 4,
  6. "list": [
  7. {
  8. "member_car_id": 4,
  9. "member_id": 488786,
  10. "car_plate_num": "沪C0C6T2",
  11. "create_time": "2017-11-06 14:43:49"
  12. },
  13. {
  14. "member_car_id": 3,
  15. "member_id": 0,
  16. "car_plate_num": "沪C0C6T2",
  17. "create_time": "1970-01-01 08:00:00"
  18. },
  19. {
  20. "member_car_id": 2,
  21. "member_id": 488786,
  22. "car_plate_num": "陕A3WQ75",
  23. "create_time": "2017-11-06 14:43:49"
  24. }
  25. ]
  26. }
  27. }

我的优惠劵

api

http://dev.mallservice.chamshare.cn/park/Content/myCoupon

params

  1. {
  2. "token": "token",
  3. page,
  4. page_size
  5. }

response

  1. {
  2. "code": 0,
  3. "message": "调用成功",
  4. "data": {
  5. "count": 1,
  6. "list": [
  7. {
  8. "coupon_id": 42,
  9. "title": "一小时停车券",
  10. "status": 0,
  11. "status_text": "未兑换",
  12. "valid_stime": "1970-01-01 08:00:00",
  13. "valid_etime": "1970-01-01 08:00:00",
  14. "ctime": "2018-04-22 00:01:01"
  15. }
  16. ]
  17. }
  18. }

我的积分

api

http://dev.mallservice.chamshare.cn/park/Content/myIntegral

params

  1. {
  2. "token": "token"
  3. }

response

  1. {
  2. "code": 0,
  3. "message": "调用成功",
  4. "data": {
  5. "intergral_num": 250,
  6. "phone": "18221995891"
  7. }
  8. }

我的订单

api

http://dev.mallservice.chamshare.cn/park/Order/query

params

  1. {
  2. "token": "token",
  3. page,
  4. page_size
  5. }

response

  1. {
  2. "code": 0,
  3. "message": "调用成功",
  4. "data": {
  5. "count": 115,
  6. "list": [
  7. {
  8. "order_no": "20180424143130001",
  9. "car_plate_num": "陕A3WQ75",
  10. "in_time": "1970-01-01 08:00:00", //进场时间
  11. "out_time": "1970-01-01 08:00:00",
  12. "coupon_free": "0.00", // 优惠券减免金额
  13. "intergral_free": "0.00", // 积分减免金额
  14. "payable_amount": "100.00", // 应付金额
  15. "paid_amount": "100.00", // 实付金额
  16. "create_time": "2018-04-24 18:45:31" // 支付时间
  17. "pay_type": 0, // 支付方式
  18. "pay_type_text": "其它", // 支付方式说明
  19. }
  20. ]
  21. }

获取微信jsSdkConfig进行扫码

api

http://dev.mallservice.chamshare.cn/park/Content/getJsSdk  

params

  1. {
  2. "token": "token" // 请求后一看便知
  3. }

canvas.png-5.1kB

领取优惠券

api

http://dev.mallservice.chamshare.cn/park/Content/getCoupon  

params

  1. {
  2. "token": "token" ,
  3. "coupon_str" //上面扫描得来的二维码;
  4. }

费用查询

api

http://dev.mallservice.chamshare.cn/park/Order/computeCost

params

  1. {
  2. "token": "token" ,
  3. "member_coupon_id" : id,
  4. "car_plate_num" 牌照,
  5. "is_use_integral" : 1 // 是否用积分
  6. }

return

  1. {
  2. "code": 0,
  3. "message": "调用成功",
  4. "data": {
  5. "cost": 664, //价钱
  6. payment 实际支付
  7. "car_plate_num": "沪A12345",
  8. "in_time": "2018-3-26 14:09:40",
  9. "out_time": "2018-4-26 14:09:55",
  10. "coupon_data": {
  11. "count": 13,
  12. "list": [
  13. {
  14. "member_coupon_id": 3604,
  15. "coupon_id": 43,
  16. "title": "两小时停车券",
  17. "deduct_money": 0,
  18. "coupon_type": 2,
  19. "status": 0,
  20. "status_text": "未兑换",
  21. "valid_stime": "2018-04-21 00:00:00",
  22. "valid_etime": "2018-04-30 23:59:59",
  23. "ctime": "2018-04-24 21:04:27"
  24. },
  25. {
  26. "member_coupon_id": 3603,
  27. "coupon_id": 43,
  28. "title": "两小时停车券",
  29. "deduct_money": 0,
  30. "coupon_type": 2,
  31. "status": 0,
  32. "status_text": "未兑换",
  33. "valid_stime": "1970-01-01 08:33:38",
  34. "valid_etime": "1970-01-01 08:33:38",
  35. "ctime": "2018-04-24 20:59:52"
  36. }
  37. },
  38. "integral_data": {
  39. "integral_num": 4999,
  40. "is_usable": 1 // 1可以用 0不可以用
  41. },
  42. "use_integral": -500
  43. }
  44. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注