upgrade stripe sdk to v85
This commit is contained in:
@@ -6,12 +6,12 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
"github.com/stripe/stripe-go/v81"
|
||||
billingportalsession "github.com/stripe/stripe-go/v81/billingportal/session"
|
||||
checkoutsession "github.com/stripe/stripe-go/v81/checkout/session"
|
||||
stripecustomer "github.com/stripe/stripe-go/v81/customer"
|
||||
stripeprice "github.com/stripe/stripe-go/v81/price"
|
||||
stripesub "github.com/stripe/stripe-go/v81/subscription"
|
||||
"github.com/stripe/stripe-go/v85"
|
||||
billingportalsession "github.com/stripe/stripe-go/v85/billingportal/session"
|
||||
checkoutsession "github.com/stripe/stripe-go/v85/checkout/session"
|
||||
stripecustomer "github.com/stripe/stripe-go/v85/customer"
|
||||
stripeprice "github.com/stripe/stripe-go/v85/price"
|
||||
stripesub "github.com/stripe/stripe-go/v85/subscription"
|
||||
)
|
||||
|
||||
type Service interface {
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"log/slog"
|
||||
"time"
|
||||
|
||||
"github.com/stripe/stripe-go/v81"
|
||||
"github.com/stripe/stripe-go/v81/webhook"
|
||||
"github.com/stripe/stripe-go/v85"
|
||||
"github.com/stripe/stripe-go/v85/webhook"
|
||||
)
|
||||
|
||||
func (s *serviceImpl) HandleWebhook(ctx context.Context, payload []byte, signature string) error {
|
||||
@@ -95,8 +95,8 @@ func subscriptionFromStripe(sub *stripe.Subscription, networkID string) (*Subscr
|
||||
Cadence: cadence,
|
||||
Quantity: int(item.Quantity),
|
||||
CancelAtPeriodEnd: sub.CancelAtPeriodEnd,
|
||||
CurrentPeriodStart: time.Unix(sub.CurrentPeriodStart, 0).UTC(),
|
||||
CurrentPeriodEnd: time.Unix(sub.CurrentPeriodEnd, 0).UTC(),
|
||||
CurrentPeriodStart: time.Unix(item.CurrentPeriodStart, 0).UTC(),
|
||||
CurrentPeriodEnd: time.Unix(item.CurrentPeriodEnd, 0).UTC(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user