Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix: Modify handle_processor_response for Stripe to handle string tru…
Browse files Browse the repository at this point in the history
…e false value
  • Loading branch information
julianajlk committed May 6, 2024
1 parent 10f931a commit 647da2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ecommerce/extensions/payment/processors/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ def get_transaction_parameters(self, basket, request=None, use_client_side_check
def handle_processor_response(self, response, basket=None):
# pretty sure we should simply return/error if basket is None, as not
# sure what it would mean if there
payment_intent_id = response['payment_intent_id']
dynamic_payment_methods_enabled = response['dynamic_payment_methods_enabled']
payment_intent_id = response.get('payment_intent_id', None)
dynamic_payment_methods_enabled = response.get('dynamic_payment_methods_enabled', None) == 'true'
# NOTE: In the future we may want to get/create a Customer. See https://stripe.com/docs/api#customers.

# rewrite order amount so it's updated for coupon & quantity and unchanged by the user
Expand Down

0 comments on commit 647da2e

Please sign in to comment.