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.
|
package ln
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func InvoiceHttpCode(invoice *Invoice) int {
|
|
if invoice.Expired {
|
|
return http.StatusGone
|
|
}
|
|
|
|
if invoice.Status == "unpaid" {
|
|
return http.StatusPaymentRequired
|
|
}
|
|
|
|
return http.StatusOK
|
|
|
|
}
|