Skip to content

Commit

Permalink
Merge pull request #35 from resonatecoop/disable-membership-shares-re…
Browse files Browse the repository at this point in the history
…cord

Do not record user memberships and data in postgres db anymore
  • Loading branch information
Augustin authored Feb 19, 2023
2 parents df0941c + 4255715 commit 43b0b85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webhook/stripe_payment.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func (s *Service) stripePayment(w http.ResponseWriter, r *http.Request) {
}
}

/* BROKEN!
if session.Metadata["shares"] != "" {
log.INFO.Printf("Number of shares: %s", session.Metadata["shares"])
Expand Down Expand Up @@ -182,6 +183,7 @@ func (s *Service) stripePayment(w http.ResponseWriter, r *http.Request) {
return
}
}
*/

if session.Metadata["credits"] != "" {
log.INFO.Printf("Number of credits: %s", session.Metadata["credits"])
Expand Down Expand Up @@ -236,7 +238,7 @@ func (s *Service) stripePayment(w http.ResponseWriter, r *http.Request) {

// processMembership
func (s *Service) processMembership(customerEmail, subscriptionID, productID string) error {
user, err := s.oauthService.FindUserByUsername(customerEmail)
_, err := s.oauthService.FindUserByUsername(customerEmail)

if err != nil {
log.ERROR.Print(err)
Expand All @@ -255,10 +257,12 @@ func (s *Service) processMembership(customerEmail, subscriptionID, productID str
}

if templateName != "" {
/* BROKEN!
if err = s.AddMembership(user, productID, subscriptionID); err != nil {
log.ERROR.Print(err)
return err
}
*/

if err = s.GrantMemberStatus(customerEmail, true); err != nil {
log.ERROR.Print(err)
Expand Down

0 comments on commit 43b0b85

Please sign in to comment.