Skip to content

Commit

Permalink
fix(billing): Upgrade from stripe v76 to v78
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotcourant committed May 27, 2024
1 parent eaecc96 commit b8625b7
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require (
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.17.0
github.com/stretchr/testify v1.8.4
github.com/stripe/stripe-go/v76 v76.25.0
github.com/stripe/stripe-go/v78 v78.8.0
github.com/teambition/rrule-go v1.8.2
github.com/vmihailenco/msgpack/v5 v5.3.5
github.com/wneessen/go-mail v0.4.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stripe/stripe-go/v76 v76.25.0 h1:kmDoOTvdQSTQssQzWZQQkgbAR2Q8eXdMWbN/ylNalWA=
github.com/stripe/stripe-go/v76 v76.25.0/go.mod h1:rw1MxjlAKKcZ+3FOXgTHgwiOa2ya6CPq6ykpJ0Q6Po4=
github.com/stripe/stripe-go/v78 v78.8.0 h1:2/bLAbJyrH9dE4OsL1uCFhVEW8jS1dTV3fEkK3G0vvs=
github.com/stripe/stripe-go/v78 v78.8.0/go.mod h1:GjncxVLUc1xoIOidFqVwq+y3pYiG7JLVWiVQxTsLrvQ=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8=
Expand Down
2 changes: 1 addition & 1 deletion server/billing/easy.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/monetr/monetr/server/pubsub"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func buildAccountCacheKey(accountId ID[Account]) string {
Expand Down
2 changes: 1 addition & 1 deletion server/billing/paywall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/monetr/monetr/server/internal/myownsanity"
"github.com/monetr/monetr/server/internal/testutils"
"github.com/stretchr/testify/assert"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func TestBaseBasicPaywall_GetHasSubscription(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/billing/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/monetr/monetr/server/pubsub"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

type StripeWebhookHandler interface {
Expand Down
2 changes: 1 addition & 1 deletion server/controller/billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/monetr/monetr/server/crumbs"
"github.com/monetr/monetr/server/internal/myownsanity"
"github.com/monetr/monetr/server/stripe_helper"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

// Create Checkout Session
Expand Down
2 changes: 1 addition & 1 deletion server/controller/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/labstack/echo/v4"
"github.com/monetr/monetr/server/crumbs"
"github.com/stripe/stripe-go/v76/webhook"
"github.com/stripe/stripe-go/v78/webhook"
)

func (c *Controller) handleStripeWebhook(ctx echo.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion server/internal/fixtures/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/monetr/monetr/server/models"
"github.com/monetr/monetr/server/repository"
"github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
"github.com/xlzd/gotp"
)

Expand Down
2 changes: 1 addition & 1 deletion server/internal/mock_stripe/checkout.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/monetr/monetr/server/internal/mock_http_helper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func (m *MockStripeHelper) MockNewCheckoutSession(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/internal/mock_stripe/checkout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/jarcoal/httpmock"
"github.com/stretchr/testify/assert"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func TestMockStripeGetCompletedCheckoutSession(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/internal/mock_stripe/customers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/monetr/monetr/server/internal/mock_http_helper"
"github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func (m *MockStripeHelper) MockStripeCreateCustomerSuccess(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/internal/mock_stripe/prices.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/monetr/monetr/server/internal/mock_http_helper"
"github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

const stripeHost = "https://api.stripe.com"
Expand Down
2 changes: 1 addition & 1 deletion server/internal/mock_stripe/products.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/brianvoe/gofakeit/v6"
"github.com/monetr/monetr/server/internal/mock_http_helper"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func MockStripeListProductsSuccess(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/internal/mock_stripe/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

type MockStripeHelper struct {
Expand Down
2 changes: 1 addition & 1 deletion server/internal/mock_stripe/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/monetr/monetr/server/internal/mock_http_helper"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func (m *MockStripeHelper) MockGetSubscription(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/models/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/monetr/monetr/server/feature"
"github.com/monetr/monetr/server/internal/myownsanity"
"github.com/pkg/errors"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion server/stripe_helper/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/getsentry/sentry-go"
"github.com/monetr/monetr/server/cache"
"github.com/sirupsen/logrus"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

type StripeCache interface {
Expand Down
4 changes: 2 additions & 2 deletions server/stripe_helper/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/monetr/monetr/server/round"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/stripe/stripe-go/v76"
stripe_client "github.com/stripe/stripe-go/v76/client"
"github.com/stripe/stripe-go/v78"
stripe_client "github.com/stripe/stripe-go/v78/client"
)

type Stripe interface {
Expand Down
2 changes: 1 addition & 1 deletion server/stripe_helper/stripe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/monetr/monetr/server/internal/testutils"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func TestStripeBase_CreateCustomer(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/stripe_helper/subscriptions.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package stripe_helper

import "github.com/stripe/stripe-go/v76"
import "github.com/stripe/stripe-go/v78"

// SubscriptionIsActive is a helper function that takes in a Stripe subscription object and returns true or false based
// on the state of that object's subscription. This is used to handle scenarios where multiple factors could lead to
Expand Down
2 changes: 1 addition & 1 deletion server/stripe_helper/subscriptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stripe/stripe-go/v76"
"github.com/stripe/stripe-go/v78"
)

func TestSubscriptionIsActive(t *testing.T) {
Expand Down

0 comments on commit b8625b7

Please sign in to comment.