Skip to content

Commit e72cbad

Browse files
committed
Authenticate stripe calls for payment intents
Duh.
1 parent 629566d commit e72cbad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

payments/stripe/stripe.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"github.com/sirupsen/logrus"
1414
stripe "github.com/stripe/stripe-go"
1515
"github.com/stripe/stripe-go/client"
16-
"github.com/stripe/stripe-go/paymentintent"
1716
)
1817

1918
type stripePaymentProvider struct {
@@ -137,7 +136,7 @@ func (s *stripePaymentProvider) chargePaymentIntent(paymentMethodID string, amou
137136
)),
138137
Confirm: stripe.Bool(true),
139138
}
140-
intent, err := paymentintent.New(params)
139+
intent, err := s.client.PaymentIntents.New(params)
141140
if err != nil {
142141
return "", err
143142
}
@@ -185,7 +184,7 @@ func (s *stripePaymentProvider) NewConfirmer(ctx context.Context, r *http.Reques
185184
}
186185

187186
func (s *stripePaymentProvider) confirm(paymentID string) error {
188-
_, err := paymentintent.Confirm(paymentID, nil)
187+
_, err := s.client.PaymentIntents.Confirm(paymentID, nil)
189188

190189
if stripeErr, ok := err.(*stripe.Error); ok {
191190
return payments.NewPaymentConfirmFailError(stripeErr.Msg)

0 commit comments

Comments
 (0)