SiteFinanceLogDict.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\dict\site;
  12. class SiteFinanceLogDict
  13. {
  14. const ORDER_TRADE = 'order_trade';//订单交易
  15. const ORDER_REFUND = 'order_refund';//订单退款
  16. /**
  17. * 业务类型
  18. * @param int|string $trade_type
  19. * @return array|mixed|string
  20. */
  21. public static function getTradeType(int|string $trade_type = '')
  22. {
  23. $data = [
  24. self::ORDER_TRADE => get_lang('dict_site_finance.order_trade'),//订单交易
  25. self::ORDER_REFUND => get_lang('dict_site_finance.order_refund'),//订单退款
  26. ];
  27. if (empty($trade_type)) {
  28. return $data;
  29. }
  30. return $data[$trade_type] ?? '';
  31. }
  32. const PLAT_SERVICE = 'plat_service';//平台手续费
  33. const SITE_SEPARATE = 'site_separate';//商户分账
  34. const PAY = 'pay';//交易支付
  35. const BALANCE_PAY = 'balance_pay';//余额
  36. /**
  37. * 类型
  38. * @param int|string $trade_type
  39. * @return array|mixed|string
  40. */
  41. public static function getType(int|string $trade_type = '')
  42. {
  43. $data = [
  44. self::PLAT_SERVICE => get_lang('dict_site_finance.plat_service'),//平台手续费
  45. self::SITE_SEPARATE => get_lang('dict_site_finance.site_separate'),//站点分账
  46. self::PAY => get_lang('dict_site_finance.site_separate'),//交易支付
  47. self::PAY => get_lang('dict_site_finance.site_separate'),//交易支付
  48. ];
  49. if (empty($trade_type)) {
  50. return $data;
  51. }
  52. return $data[$trade_type] ?? '';
  53. }
  54. }