PaymentTemplate.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2024 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types=1);
  12. namespace app\api\model;
  13. use app\common\enum\payment\Method as PaymentMethodEnum;
  14. use app\common\model\PaymentTemplate as PaymentTemplateModel;
  15. /**
  16. * 模型类:支付方式记录
  17. * Class PaymentTemplate
  18. * @package app\api\model
  19. */
  20. class PaymentTemplate extends PaymentTemplateModel
  21. {
  22. /**
  23. * 隐藏字段
  24. * @var array
  25. */
  26. protected $hidden = [
  27. 'name',
  28. 'remarks',
  29. 'sort',
  30. 'is_delete',
  31. 'store_id',
  32. 'create_time',
  33. 'update_time'
  34. ];
  35. /**
  36. * 根据微信支付V3平台证书序号查找记录
  37. * @param string $serial
  38. * @return static|array|null
  39. */
  40. public static function findByWechatpaySerial(string $serial)
  41. {
  42. return static::get(['method' => PaymentMethodEnum::WECHAT, 'wechatpay_serial' => $serial]);
  43. }
  44. }