Return Payment Status

This commit is contained in:
aditya.siregar
2024-08-28 13:55:21 +07:00
parent 7aceb0488b
commit dacd341c6e
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -137,6 +137,18 @@ type HistoryOrder struct {
Source string `gorm:"type:numeric;column:source"`
}
func (h *HistoryOrder) GetPaymentStatus() string {
if h.Status == "PAID" {
return "E-TICKET TELAH TERBIT"
}
if h.Status == "PENDING" {
return "MENUNGGU PEMBAYARAN"
}
return ""
}
type HistoryOrderDB struct {
HistoryOrder
}