PaymentException.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 2017/4/17
  6. * Time: 下午6:10
  7. */
  8. namespace app\common\exceptions;
  9. class PaymentException extends ShopException
  10. {
  11. /**
  12. * 商城支付密码设置未开启错误码
  13. */
  14. const PAY_PASSWORD_SETTING_CLOSED = 2001;
  15. /**
  16. * 用户未设置支付密码错误码
  17. */
  18. const MEMBER_NOT_SET_PAY_PASSWORD = 2002;
  19. /**
  20. * 支付密码错误错误码
  21. */
  22. const PAY_PASSWORD_ERROR = 2003;
  23. public function settingClose()
  24. {
  25. $this->code = self::PAY_PASSWORD_SETTING_CLOSED;
  26. $this->message = '商城支付密码设置未开启';
  27. $this->data['code'] = $this->code;
  28. return $this;
  29. }
  30. public function notSet()
  31. {
  32. $this->code = self::MEMBER_NOT_SET_PAY_PASSWORD;
  33. $this->message = '用户未设置支付密码';
  34. $this->data['code'] = $this->code;
  35. return $this;
  36. }
  37. public function passwordError()
  38. {
  39. $this->code = self::PAY_PASSWORD_ERROR;
  40. $this->message = '支付密码错误';
  41. $this->data['code'] = $this->code;
  42. return $this;
  43. }
  44. }