PaymentCallback.php 560 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * 支付回调日志.
  6. */
  7. class PaymentCallback extends Model
  8. {
  9. protected $table = 'payment_callback';
  10. protected $guarded = [];
  11. public function getStatusLabelAttribute(): string
  12. {
  13. return match ($this->status) {
  14. 'WAIT_BUYER_PAY' => '等待买家付款',
  15. 'WAIT_SELLER_SEND_GOODS' => '等待卖家发货',
  16. 'TRADE_SUCCESS' => '交易成功',
  17. 'PAID' => '支付完成',
  18. default => '',
  19. };
  20. }
  21. }