File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def handle(self, **kwargs):
11
11
try :
12
12
stripe .Plan .retrieve ("monthly" )
13
13
print ("Monthly plan exists, not creating!" )
14
- except stripe .error . InvalidRequestError :
14
+ except stripe .InvalidRequestError :
15
15
name = "Monthly donation"
16
16
logger .info (f"Creating plan: { name } " )
17
17
stripe .Plan .create (
@@ -25,7 +25,7 @@ def handle(self, **kwargs):
25
25
try :
26
26
stripe .Plan .retrieve ("quarterly" )
27
27
print ("Quarterly plan exists, not creating!" )
28
- except stripe .error . InvalidRequestError :
28
+ except stripe .InvalidRequestError :
29
29
name = "Quarterly donation"
30
30
logger .info (f"Creating plan: { name } " )
31
31
stripe .Plan .create (
@@ -40,7 +40,7 @@ def handle(self, **kwargs):
40
40
try :
41
41
stripe .Plan .retrieve ("yearly" )
42
42
print ("Yearly plan exists, not creating!" )
43
- except stripe .error . InvalidRequestError :
43
+ except stripe .InvalidRequestError :
44
44
name = "Yearly donation"
45
45
logger .info (f"Creating plan: { name } " )
46
46
stripe .Plan .create (
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ def stripe_data(self, filename):
263
263
file_path = settings .BASE_DIR .joinpath (f"fundraising/test_data/{ filename } .json" )
264
264
with file_path .open () as f :
265
265
data = json .load (f )
266
- return stripe .util . convert_to_stripe_object (data , stripe .api_key , None )
266
+ return stripe .convert_to_stripe_object (data , stripe .api_key , None )
267
267
268
268
def post_event (self , data ):
269
269
return self .client .post (
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ def update_card(request):
160
160
donation .stripe_customer_id ,
161
161
source = request .POST ["stripe_token" ],
162
162
)
163
- except stripe .error . StripeError as e :
163
+ except stripe .StripeError as e :
164
164
data = {"success" : False , "error" : str (e )}
165
165
else :
166
166
data = {"success" : True }
@@ -195,7 +195,7 @@ def receive_webhook(request):
195
195
request .headers ["stripe-signature" ],
196
196
settings .STRIPE_ENDPOINT_SECRET ,
197
197
)
198
- except (KeyError , ValueError , stripe .error . SignatureVerificationError ):
198
+ except (KeyError , ValueError , stripe .SignatureVerificationError ):
199
199
return HttpResponse (status = 422 )
200
200
201
201
return WebhookHandler (event ).handle ()
You can’t perform that action at this time.
0 commit comments