paycenter.mod.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. function paycenter_order_status() {
  8. return array(
  9. '0' => array(
  10. 'text' => '未支付',
  11. 'class' => 'text-danger',
  12. ),
  13. '1' => array(
  14. 'text' => '已支付',
  15. 'class' => 'text-success',
  16. ),
  17. '2' => array(
  18. 'text' => '已支付,退款中...',
  19. 'class' => 'text-default',
  20. ),
  21. );
  22. }
  23. function paycenter_order_types() {
  24. return array(
  25. 'wechat' => '微信支付',
  26. 'alipay' => '支付宝支付',
  27. 'credit' => '余额支付',
  28. 'baifubao' => '百付宝'
  29. );
  30. }
  31. function paycenter_order_trade_types() {
  32. return array(
  33. 'native' => '扫码支付',
  34. 'jsapi' => '公众号支付',
  35. 'micropay' => '刷卡支付'
  36. );
  37. }
  38. function paycenter_check_login() {
  39. global $_W, $_GPC;
  40. if(empty($_W['uid']) && $_GPC['do'] != 'login') {
  41. itoast('抱歉,您无权进行该操作,请先登录', murl('entry', array('m' => 'we7_coupon', 'do' => 'clerk', 'op' => 'login'), true, true), 'error');
  42. }
  43. if($_W['user']['type'] == ACCOUNT_OPERATE_CLERK) {
  44. isetcookie('__uniacid', $_W['user']['uniacid'], 7 * 86400);
  45. isetcookie('__uid', $_W['uid'], 7 * 86400);
  46. } else {
  47. itoast('非法访问', '', 'error');
  48. }
  49. }