Skip to content

Commit

Permalink
test line items
Browse files Browse the repository at this point in the history
  • Loading branch information
TeisNP committed Feb 1, 2024
1 parent 8324c3f commit f84c443
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/rest/controllers/webhooks/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ func (h *Handlers) handleWebhook(c hs.StripeContext) error {
// return echo.ErrBadRequest
// }

lineItem := h.BillingService.GetLineItems(session.ID).LineItem()

c.Log.Error(session.ClientReferenceID)
c.Log.Error(session)
c.Log.Error(session.ID)
c.Log.Error(lineItem)
c.Log.Error(event.Data.Object["customer"].(string))
lineItems := h.BillingService.GetLineItems(session.ID).List()
c.Log.Error(lineItems)

teamID, err := strconv.ParseUint(session.ClientReferenceID, 10, 32)
if err != nil {
Expand All @@ -68,7 +68,7 @@ func (h *Handlers) handleWebhook(c hs.StripeContext) error {

// TODO if not same plan remove old plan

if customerTeam.PaymentPlan == lineItem.Price.Product.Name {
if customerTeam.PaymentPlan == "TEST" { //lineItems.Price.Product.Name {
return c.NoContent(http.StatusOK)
}

Expand Down

0 comments on commit f84c443

Please sign in to comment.