You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
230 B
Go
19 lines
230 B
Go
5 years ago
|
package ln
|
||
5 years ago
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
5 years ago
|
func InvoiceHttpCode(invoice *Invoice) int {
|
||
5 years ago
|
if invoice.Expired {
|
||
|
return http.StatusGone
|
||
|
}
|
||
|
|
||
|
if invoice.Status == "unpaid" {
|
||
|
return http.StatusPaymentRequired
|
||
|
}
|
||
|
|
||
|
return http.StatusOK
|
||
|
|
||
|
}
|