INNER CODE UNIT · Go
priceMatchesStripe
theopenlane/core · cmd/catalog/main.go:524
func priceMatchesStripe(p *stripe.Price, cp catalog.Price, prodID string) bool {
if p == nil {
return false
}
if p.Product == nil || p.Product.ID != prodID {
return false
}
if cp.UnitAmount != 0 && p.UnitAmount != cp.UnitAmount {
return false
}
if cp.Interval != "" {
if p.Recurring == nil || string(p.Recurring.Interval) != cp.Interval {
return false
}
}