PaymentCallback.php 580 B

123456789101112131415161718192021222324
  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 [
  14. 'WAIT_BUYER_PAY' => '等待买家付款',
  15. 'WAIT_SELLER_SEND_GOODS' => '等待卖家发货',
  16. 'TRADE_SUCCESS' => '交易成功',
  17. 'PAID' => '支付完成',
  18. ][$this->attributes['status']] ?? '';
  19. }
  20. }